From ee7aebe4b1db5d34f591fb049d0777c797043440 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Sun, 23 Jun 2024 10:29:40 +0000 Subject: [PATCH] refactor(lib): :truck: rename strings JS file to constants in library directory Going to extend that other than Markdownified strings in English for things like showing donation options. Signed-off-by: Andrei Jiroh Halili --- lib/constants.js | 32 ++++++++++++++++++++++++++++++++ lib/strings.js | 14 -------------- 2 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 lib/constants.js delete mode 100644 lib/strings.js diff --git a/lib/constants.js b/lib/constants.js new file mode 100644 index 0000000..9abe7fe --- /dev/null +++ b/lib/constants.js @@ -0,0 +1,32 @@ +import { Markup } from "telegraf" + +export const startMsg = `\ +*Hello there\\!* + +I am an Telegram bot that handle donations for @ajhalili2006's \ +open\\-source and writing work, as well as managing monthly and annual \ +sponsorship \\(and its perks\\)\\. + +If you want me to use this bot for your own sponsorship program, \ +you may need to fork the codebase that powers this bot under the \ +terms of AGPL license\\. + +To get started, tap the *Donate to the tipjar* button \ +below or use /donate command\\. +` + +const donationStep1 = `\ + + +` + +export const donationOptions = Markup.inlineKeyboard([ + [ + Markup.button.callback("50", "50_XTR"), + Markup.button.callback("75", "75_XTR") + ] +]) + +// LINKS +export const sponsorsWebsiteUrl = "https://sponsors.andreijiroh.xyz" +export const homepage = "https://mau.dev/andreijiroh-dev/tgdonatebot" \ No newline at end of file diff --git a/lib/strings.js b/lib/strings.js deleted file mode 100644 index d5afdc7..0000000 --- a/lib/strings.js +++ /dev/null @@ -1,14 +0,0 @@ -export const startMsg = `\ -Hello there! - -I am an Telegram bot that handle donations for @ajhalili2006's \ -open-source and writing work, as well as managing monthly and annual \ -sponsorship (and its perks). - -If you want me to use this bot for your own sponsorship program, \ -you may need to fork the codebase that powers this bot under the \ -terms of AGPL license. -` - -export const sponsorsWebsiteUrl = "https://sponsors.andreijiroh.xyz" -export const homepage = "https://mau.dev/andreijiroh-dev/tgdonatebot" \ No newline at end of file -- 2.51.2