Add support message

This commit is contained in:
2022-08-20 19:39:16 +03:00
parent 1e2237bb83
commit 40da6d8b56
3 changed files with 15 additions and 2 deletions

View File

@@ -7,7 +7,8 @@ export async function setCommands(bot: Telegraf) {
{command: "random", description: "Попытать удачу"},
{command: "update_log", description: "Обновления каталога"},
{command: "settings", description: "Настройки"},
{command: "help", description: "Помощь"},
{command: "support", description: "Поддержать разработчика"},
// {command: "help", description: "Помощь"},
]);
}

View File

@@ -87,6 +87,14 @@ export async function createApprovedBot(token: string, state: BotState): Promise
bot.command(["help", `help@${me.username}`], async (ctx: Context) => ctx.reply(Messages.HELP_MESSAGE));
bot.command(["support", `support@{me.username}`], async (ctx: Context) => {
const keyboard = Markup.inlineKeyboard([
Markup.button.url("☕️ Поддержать разработчика", "https://kurbezz.github.io/Kurbezz/")
]);
ctx.reply(Messages.SUPPORT_MESSAGE, {parse_mode: 'Markdown', reply_markup: keyboard.reply_markup});
});
registerPaginationCommand(
bot, CallbackData.SEARCH_BOOK_PREFIX, getSearchArgs, null, BookLibrary.searchByBookName, formatBookShort, undefined, Messages.BOOKS_NOT_FOUND
);

View File

@@ -1,6 +1,6 @@
export const START_MESSAGE = 'Привет, {name}! \n' +
'Этот бот поможет тебе загружать книги.\n' +
'Узнать, как со мной работать /help.\n' +
// 'Узнать, как со мной работать /help.\n' +
'Настройки языков для поиска /settings.\n';
export const HELP_MESSAGE = 'Пока пусто :(';
@@ -16,3 +16,7 @@ export const AUTHORS_NOT_FOUND = "Авторы не найдены.";
export const TRANSLATORS_NOT_FOUND = "Переводчики не найдены.";
export const SEQUENCES_NOT_FOUND = "Серии не найдены.";
export const SUPPORT_MESSAGE =
'[Лицензии](https://github.com/flibusta-apps/book_bot/blob/main/LICENSE.md) \n\n' +
'[Исходный код](https://github.com/flibusta-apps)\n';