From 551891e4c3590cdfbc3cf96dbcc9eb061daaada5 Mon Sep 17 00:00:00 2001 From: GramingFoxTeam Date: Fri, 18 Nov 2022 15:29:58 +0300 Subject: [PATCH] style: run prettier and eslint --- bots/telegram/events/telegram/callbackQuery.js | 12 ++++-------- bots/telegram/index.js | 4 +++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bots/telegram/events/telegram/callbackQuery.js b/bots/telegram/events/telegram/callbackQuery.js index 9e0da9e..85d2154 100644 --- a/bots/telegram/events/telegram/callbackQuery.js +++ b/bots/telegram/events/telegram/callbackQuery.js @@ -6,14 +6,10 @@ export default { const isAdmin = admins.find((admin) => admin.user.id === cb.from.id); if (!isAdmin) - return bot.sendMessage( - cb.message.chat.id, - 'You\'re not an admin.', - { - message_thread_id: cb.message.message_thread_id, - reply_to_message_id: cb.message.message_id - } - ); + return bot.sendMessage(cb.message.chat.id, 'You\'re not an admin.', { + message_thread_id: cb.message.message_thread_id, + reply_to_message_id: cb.message.message_id + }); helper.sendTrainData( cb.message.reply_to_message.text.toLowerCase(), diff --git a/bots/telegram/index.js b/bots/telegram/index.js index f105ea3..67c7ef3 100644 --- a/bots/telegram/index.js +++ b/bots/telegram/index.js @@ -24,7 +24,9 @@ for (const file of commandFiles) { const filePath = join(commandsPath, file); const command = (await import(`file://${filePath}`)).default; if ('command' in command && 'execute' in command) { - bot.onText(command.command, (...args) => command.execute(bot, config, ...args)); + bot.onText(command.command, (...args) => + command.execute(bot, config, ...args) + ); } else { console.log( `[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`