Database implemented for the Last.fm command instead of specifying the user + help

This commit is contained in:
Lucas Gabriel 2024-09-25 00:02:41 -03:00
parent 412ae681e2
commit da37e6b634
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
6 changed files with 85 additions and 15 deletions

View file

@ -9,7 +9,8 @@ async function sendHelpMessage(ctx, isEditing) {
reply_markup: {
inline_keyboard: [
[{ text: Strings.mainCommands, callback_data: '1' }, { text: Strings.usefulCommands, callback_data: '2' }],
[{ text: Strings.interactiveEmojis, callback_data: '3' }, { text: Strings.funnyCommands, callback_data: '4' }]
[{ text: Strings.interactiveEmojis, callback_data: '3' }, { text: Strings.funnyCommands, callback_data: '4' }],
[{ text: Strings.lastFm, callback_data: '5' }]
]
}
};
@ -33,7 +34,7 @@ module.exports = (bot) => {
parse_mode: 'Markdown',
reply_markup: JSON.stringify({
inline_keyboard: [
[{ text: Strings.goBack, callback_data: '5' }],
[{ text: Strings.goBack, callback_data: '6' }],
]
})
};
@ -56,6 +57,10 @@ module.exports = (bot) => {
await ctx.editMessageText(Strings.funnyCommandsDesc, options);
break;
case '5':
await ctx.answerCbQuery();
await ctx.editMessageText(Strings.lastFmDesc, options);
break;
case '6':
await ctx.answerCbQuery();
await sendHelpMessage(ctx, true);
break;