mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 12:49:57 +00:00
Updated bot update logic
This commit is contained in:
parent
2067e21a34
commit
6ba348ed83
@ -107,11 +107,11 @@ module.exports = (bot) => {
|
|||||||
const Strings = getStrings(ctx.from.language_code);
|
const Strings = getStrings(ctx.from.language_code);
|
||||||
handleAdminCommand(ctx, async () => {
|
handleAdminCommand(ctx, async () => {
|
||||||
try {
|
try {
|
||||||
await ctx.reply(Strings.botUpdated, {
|
const updateMessage = await updateBot();
|
||||||
|
await ctx.reply(Strings.botUpdated.replace('{updateMessage}', updateMessage), {
|
||||||
parse_mode: 'Markdown',
|
parse_mode: 'Markdown',
|
||||||
reply_to_message_id: ctx.message.message_id
|
reply_to_message_id: ctx.message.message_id
|
||||||
});
|
});
|
||||||
updateBot();
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ctx.reply(Strings.errorUpdatingBot.replace('{error}', error), {
|
ctx.reply(Strings.errorUpdatingBot.replace('{error}', error), {
|
||||||
parse_mode: 'Markdown',
|
parse_mode: 'Markdown',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user