bot.js aktualisiert
This commit is contained in:
parent
446b4d4b4d
commit
82d536425c
16
bot.js
16
bot.js
|
@ -443,18 +443,11 @@ bot.onText(/\/latestmovie/, async (msg) => {
|
||||||
});
|
});
|
||||||
logError(`Error fetching latest movie: No response from server`);
|
logError(`Error fetching latest movie: No response from server`);
|
||||||
} else {
|
} else {
|
||||||
bot.sendMessage(chatId, 'Fehler beim Abrufen der neuesten Filme. Unbekannter Fehler.').catch(err => {
|
|
||||||
logError(`Error sending unknown error message to chatId ${chatId}: ${err.message}`);
|
|
||||||
});
|
|
||||||
logError(`Error fetching latest movie: ${error.message}`);
|
logError(`Error fetching latest movie: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /info-Befehl verarbeiten
|
// /info-Befehl verarbeiten
|
||||||
bot.onText(/\/info/, async (msg) => {
|
bot.onText(/\/info/, async (msg) => {
|
||||||
const chatId = msg.chat.id;
|
const chatId = msg.chat.id;
|
||||||
|
@ -668,13 +661,6 @@ async function fetchPlexData(url) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Funktion zum Erstellen des Inline-Keyboard für die Auswahl von Film oder Serie
|
// Funktion zum Erstellen des Inline-Keyboard für die Auswahl von Film oder Serie
|
||||||
function getTypeKeyboard() {
|
function getTypeKeyboard() {
|
||||||
return {
|
return {
|
||||||
|
@ -689,7 +675,7 @@ function getTypeKeyboard() {
|
||||||
|
|
||||||
// Funktion zum Senden des Wunsches an zwei Benutzer
|
// Funktion zum Senden des Wunsches an zwei Benutzer
|
||||||
async function sendWish(wish, type, chatId) {
|
async function sendWish(wish, type, chatId) {
|
||||||
const message = `❗️ Achtung ❗️\n\nEin neuer ${type} Wunsch ist eingegangen:\n\nType: ${type}\n\nTitel:\n${wish}`;
|
const message = `✨ **Achtung!** ✨\n\nEin neuer Wunsch ist eingegangen:\n\n🔹 **Typ:** ${type}\n\n🔹 **Titel:**\n${wish}`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
|
Loading…
Reference in New Issue