wunsch-bot.js aktualisiert

This commit is contained in:
M_Viper 2024-09-07 18:05:16 +00:00
parent 266da64405
commit 2e3c80305f
1 changed files with 401 additions and 396 deletions

View File

@ -249,10 +249,10 @@ bot.on('callback_query', async (ctx) => {
'category_survival': 'Survival', 'category_survival': 'Survival',
'category_wwe': 'WWE', 'category_wwe': 'WWE',
'category_musik': 'Musik', 'category_musik': 'Musik',
'category_bollywood': 'Bollywood' // Bollywood-Kategorie hinzugefügt 'category_bollywood': 'Bollywood'
}; };
const category = categoryMap[data]; const category = categoryMap[data];
const categoryMessage = await ctx.reply(`Du hast ${category} ausgewählt. Bitte gib einen Link ein um keinen Link anzugeben einfach ein X eintragen (Optional).`, { disable_notification: true }); const categoryMessage = await ctx.reply(`Du hast die Kategorie ${category} ausgewählt. Bitte gib einen Link zum Cover oder zu Spotify ein. Falls du keinen Link angeben möchtest, trage einfach ein X ein (optional).`, { disable_notification: true });
userStates[chatId] = { userStates[chatId] = {
category, category,
@ -288,6 +288,10 @@ bot.on('text', async (ctx) => {
if (chatId !== allowedChatId || threadId !== allowedThreadId) { if (chatId !== allowedChatId || threadId !== allowedThreadId) {
console.log(`Ignoring message in chat ID ${chatId} and thread ID ${threadId} as it's not allowed.`); console.log(`Ignoring message in chat ID ${chatId} and thread ID ${threadId} as it's not allowed.`);
if (text.startsWith('/wunsch')) {
// Nachricht zurückweisen, wenn der Befehl in einem nicht erlaubten Kanal verwendet wird
await ctx.reply('❌ Dieser Befehl ist in diesem Kanal nicht erlaubt. Bitte benutze den Befehl in den Serien- und Filmwünsche Kanal.', { disable_notification: true });
}
return; return;
} }
@ -391,6 +395,7 @@ bot.on('text', async (ctx) => {
} }
}); });
bot.launch(); bot.launch();
console.log('Bot is running...'); console.log('Bot is running...');