mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Fix sending file
This commit is contained in:
@@ -169,7 +169,18 @@ export async function createApprovedBot(token: string, state: BotState): Promise
|
||||
registerLanguageSettingsCallback(bot, 'on', CallbackData.ENABLE_LANG_PREFIX);
|
||||
registerLanguageSettingsCallback(bot, 'off', CallbackData.DISABLE_LANG_PREFIX);
|
||||
|
||||
bot.hears(new RegExp(`^/d_[a-zA-Z0-9]+_[\\d]+(@${me.username})*$`), async (ctx) => sendFile(ctx, state));
|
||||
bot.hears(new RegExp(`^/d_[a-zA-Z0-9]+_[\\d]+(@${me.username})*$`), async (ctx) => {
|
||||
try {
|
||||
await sendFile(ctx, state)
|
||||
} catch (e) {
|
||||
Sentry.captureException(e, {
|
||||
extra: {
|
||||
action: "sendFile",
|
||||
message: ctx.message.text,
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
bot.hears(new RegExp(`^/b_an_[\\d]+(@${me.username})*$`), async (ctx: Context) => {
|
||||
if (!ctx.message || !('text' in ctx.message)) {
|
||||
|
||||
Reference in New Issue
Block a user