From b354c9497a9dae78f78bde21655c4cea3a7cc4f6 Mon Sep 17 00:00:00 2001 From: lucmsilva651 Date: Fri, 26 Jul 2024 00:47:44 -0300 Subject: [PATCH] Simplified code by removing unecessary functions --- commands/fun.js | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/commands/fun.js b/commands/fun.js index 7bc2c60..52bfc5a 100644 --- a/commands/fun.js +++ b/commands/fun.js @@ -41,30 +41,22 @@ function gayFunction(ctx) { } } -async function rollDice(ctx) { - ctx.telegram.sendDice( - ctx.chat.id, { - reply_to_message_id: ctx.message.message_id - } - ); -} - -async function spinSlot(ctx) { - ctx.telegram.sendDice( - ctx.chat.id, { - emoji: '🎰', - reply_to_message_id: ctx.message.message_id - } - ); -} - module.exports = (bot) => { - bot.command('dice', (ctx) => { - rollDice(ctx); + bot.command('dice', async (ctx) => { + ctx.telegram.sendDice( + ctx.chat.id, { + reply_to_message_id: ctx.message.message_id + } + ); }); - bot.command('slot', (ctx) => { - spinSlot(ctx); + bot.command('slot', async (ctx) => { + ctx.telegram.sendDice( + ctx.chat.id, { + emoji: '🎰', + reply_to_message_id: ctx.message.message_id + } + ); }); bot.command('furry', (ctx) => {