Soggy cat

This commit is contained in:
Lucas Gabriel 2024-09-25 23:00:38 -03:00
parent 2b779b3a55
commit 863f3a8bca
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
5 changed files with 41 additions and 10 deletions

View file

@ -14,7 +14,7 @@ function sendRandomReply(ctx, gifUrl, textKey, notTextKey) {
reply_to_message_id: ctx.message.message_id
}).catch(err => {
gifErr = gifErr.replace('{err}', err);
ctx.reply(Strings.gifErr, {
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id
@ -31,7 +31,7 @@ function sendRandomReply(ctx, gifUrl, textKey, notTextKey) {
async function handleDiceCommand(ctx, emoji, delay) {
const Strings = getStrings(ctx.from.language_code);
const result = await ctx.sendDice({ emoji, reply_to_message_id: ctx.message.message_id });
const botResponse = Strings.funEmojiResult
.replace('{emoji}', result.dice.emoji)
@ -57,10 +57,9 @@ module.exports = (bot) => {
ctx.reply(
randomVStr, {
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id
}
);
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id
});
});
bot.command('dice', spamwatchMiddleware, async (ctx) => {
@ -97,4 +96,34 @@ module.exports = (bot) => {
bot.command('gay', spamwatchMiddleware, async (ctx) => {
sendRandomReply(ctx, resources.gayFlag, 'isGay', 'isNtGay');
});
};
bot.command('soggy', spamwatchMiddleware, async (ctx) => {
const userInput = ctx.message.text.split(' ')[1];
switch (true) {
case (userInput === "2" || userInput === "thumb"):
ctx.replyWithPhoto(
resources.soggyCat2, {
caption: resources.soggyCat2,
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id
});
break;
case (userInput === "3" || userInput === "sticker"):
const stickerId = "CAACAgEAAxkBAAJ9SWb0vY0Xgg4RtNQeU5iLOx3iTVRAAAKgAwACN-NRRFf8v9p0Nz1INgQ"
ctx.replyWithSticker(stickerId, {
reply_to_message_id: ctx.message.message_id
});
break;
default:
ctx.replyWithPhoto(
resources.soggyCat, {
caption: resources.soggyCat,
parse_mode: 'Markdown',
reply_to_message_id: ctx.message.message_id
});
break;
};
});
};

View file

@ -32,6 +32,7 @@ module.exports = (bot) => {
const Strings = getStrings(ctx.from.language_code);
const options = {
parse_mode: 'Markdown',
disable_web_page_preview: true,
reply_markup: JSON.stringify({
inline_keyboard: [
[{ text: Strings.goBack, callback_data: '6' }],