diff --git a/src/bots/factory/bots/approved/callback_data.ts b/src/bots/factory/bots/approved/callback_data.ts index edab9b3..b386aa6 100644 --- a/src/bots/factory/bots/approved/callback_data.ts +++ b/src/bots/factory/bots/approved/callback_data.ts @@ -9,8 +9,8 @@ export const AUTHOR_BOOKS_PREFIX = 'ba_'; export const TRANSLATOR_BOOKS_PREFIX = 'bt_'; export const SEQUENCE_BOOKS_PREFIX = 'bs_'; -export const BOOK_ANNOTATION_PREFIX = 'a_info_'; -export const AUTHOR_ANNOTATION_PREFIX = 'b_info_'; +export const BOOK_ANNOTATION_PREFIX = 'a_an_'; +export const AUTHOR_ANNOTATION_PREFIX = 'b_an_'; export const RANDOM_BOOK = 'random_book'; export const RANDOM_AUTHOR = 'random_author'; diff --git a/src/bots/factory/bots/approved/format.ts b/src/bots/factory/bots/approved/format.ts index 81d2b46..fce5245 100644 --- a/src/bots/factory/bots/approved/format.ts +++ b/src/bots/factory/bots/approved/format.ts @@ -20,7 +20,7 @@ export function formatBook(book: AllBookTypes, short: boolean = false): string { response.push(`📖 ${book.title} | ${book.lang}`); if (book.annotation_exists) { - response.push(`📝 Аннотация: /b_info_${book.id}`) + response.push(`📝 Аннотация: /b_an_${book.id}`) } if (isTranslatorBook(book) && book.authors.length > 0) { @@ -58,7 +58,7 @@ export function formatAuthor(author: Author): string { response.push(`/a_${author.id}`); if (author.annotation_exists) { - response.push(`📝 Аннотация: /a_info_${author.id}`); + response.push(`📝 Аннотация: /a_an_${author.id}`); } return response.join('\n'); @@ -72,7 +72,7 @@ export function formatTranslator(author: Author): string { response.push(`/t_${author.id}`); if (author.annotation_exists) { - response.push(`📝 Аннотация: /a_info_${author.id}`); + response.push(`📝 Аннотация: /a_an_${author.id}`); } return response.join('\n'); diff --git a/src/bots/factory/bots/approved/index.ts b/src/bots/factory/bots/approved/index.ts index 681af2a..5964f5b 100644 --- a/src/bots/factory/bots/approved/index.ts +++ b/src/bots/factory/bots/approved/index.ts @@ -172,7 +172,7 @@ export async function createApprovedBot(token: string, state: BotState): Promise bot.hears(new RegExp(`^/d_[a-zA-Z0-9]+_[\\d]+(@${me.username})*$`), async (ctx) => sendFile(ctx, state)); - bot.hears(new RegExp(`^/b_info_[\\d]+(@${me.username})*$`), async (ctx: Context) => { + bot.hears(new RegExp(`^/b_an_[\\d]+(@${me.username})*$`), async (ctx: Context) => { if (!ctx.message || !('text' in ctx.message)) { return; } @@ -235,7 +235,7 @@ export async function createApprovedBot(token: string, state: BotState): Promise } }); - bot.hears(new RegExp(`^/a_info_[\\d]+(@${me.username})*$`), async (ctx: Context) => { + bot.hears(new RegExp(`^/a_an_[\\d]+(@${me.username})*$`), async (ctx: Context) => { if (!ctx.message || !('text' in ctx.message)) { return; }