mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 12:49:57 +00:00
Include yt-dlp on help
This commit is contained in:
parent
3aa22a6b90
commit
2067e21a34
@ -10,7 +10,7 @@ async function sendHelpMessage(ctx, isEditing) {
|
|||||||
inline_keyboard: [
|
inline_keyboard: [
|
||||||
[{ text: Strings.mainCommands, callback_data: '1' }, { text: Strings.usefulCommands, callback_data: '2' }],
|
[{ 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' }]
|
[{ text: Strings.lastFm, callback_data: '5' }, { text: Strings.ytDlp, callback_data: '6' }]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -35,7 +35,7 @@ module.exports = (bot) => {
|
|||||||
disable_web_page_preview: true,
|
disable_web_page_preview: true,
|
||||||
reply_markup: JSON.stringify({
|
reply_markup: JSON.stringify({
|
||||||
inline_keyboard: [
|
inline_keyboard: [
|
||||||
[{ text: Strings.goBack, callback_data: '6' }],
|
[{ text: Strings.goBack, callback_data: '7' }],
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
@ -62,6 +62,10 @@ module.exports = (bot) => {
|
|||||||
await ctx.editMessageText(Strings.lastFmDesc, options);
|
await ctx.editMessageText(Strings.lastFmDesc, options);
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
|
await ctx.answerCbQuery();
|
||||||
|
await ctx.editMessageText(Strings.ytDlpDesc, options);
|
||||||
|
break;
|
||||||
|
case '7':
|
||||||
await ctx.answerCbQuery();
|
await ctx.answerCbQuery();
|
||||||
await sendHelpMessage(ctx, true);
|
await sendHelpMessage(ctx, true);
|
||||||
break;
|
break;
|
||||||
|
@ -115,6 +115,8 @@ module.exports = (bot) => {
|
|||||||
parse_mode: 'Markdown',
|
parse_mode: 'Markdown',
|
||||||
reply_to_message_id: ctx.message.message_id,
|
reply_to_message_id: ctx.message.message_id,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fs.unlinkSync(mp4File);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -50,11 +50,13 @@
|
|||||||
"mainCommands": "Main commands",
|
"mainCommands": "Main commands",
|
||||||
"mainCommandsDesc": "*Main commands*\n\n- /help: Show bot's help\n- /start: Start the bot\n- /privacy: Read the bot's Privacy Policy",
|
"mainCommandsDesc": "*Main commands*\n\n- /help: Show bot's help\n- /start: Start the bot\n- /privacy: Read the bot's Privacy Policy",
|
||||||
"usefulCommands": "Useful commands",
|
"usefulCommands": "Useful commands",
|
||||||
"usefulCommandsDesc": "*Useful commands*\n\n- /chatinfo: Send information about the group\n- /userinfo: Send information about yourself\n- /d | /device `<model>`: Search for a device on GSMArena and show its specs.\n- /weather | /clima `<city>`: See weather status for a specific location.\n- /modarchive | /tma `<module id>`: Download a module from The Mod Archive.\n- /yt `<video link>`: Download an YouTube video (works with other plataforms too, check https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)",
|
"usefulCommandsDesc": "*Useful commands*\n\n- /chatinfo: Send information about the group\n- /userinfo: Send information about yourself\n- /d | /device `<model>`: Search for a device on GSMArena and show its specs.\n- /weather | /clima `<city>`: See weather status for a specific location.\n- /modarchive | /tma `<module id>`: Download a module from The Mod Archive.",
|
||||||
"funnyCommands": "Funny commands",
|
"funnyCommands": "Funny commands",
|
||||||
"funnyCommandsDesc": "*Funny commands*\n\n- /gay: Check if you are gay\n- /furry: Check if you are a furry\n- /random: Pick a random number between 0-10\n- /soggy `<1 | 2 | 3 | 4 | orig | thumb | sticker | alt>`: Sends the [Soggy cat meme](https://knowyourmeme.com/memes/soggy-cat)",
|
"funnyCommandsDesc": "*Funny commands*\n\n- /gay: Check if you are gay\n- /furry: Check if you are a furry\n- /random: Pick a random number between 0-10\n- /soggy `<1 | 2 | 3 | 4 | orig | thumb | sticker | alt>`: Sends the [Soggy cat meme](https://knowyourmeme.com/memes/soggy-cat)",
|
||||||
"interactiveEmojis": "Interactive emojis",
|
"interactiveEmojis": "Interactive emojis",
|
||||||
"interactiveEmojisDesc": "*Interactive emojis*\n\n- /dice: Roll a dice\n- /idice: Infinitely roll a colored dice\n- /slot: Try to combine the figures!\n- /ball: Try to kick the ball into the goal!\n- /bowling: Try to hit the pins!\n- /dart: Try to hit the target!",
|
"interactiveEmojisDesc": "*Interactive emojis*\n\n- /dice: Roll a dice\n- /idice: Infinitely roll a colored dice\n- /slot: Try to combine the figures!\n- /ball: Try to kick the ball into the goal!\n- /bowling: Try to hit the pins!\n- /dart: Try to hit the target!",
|
||||||
|
"ytDlp": "yt-dlp (YouTube)",
|
||||||
|
"ytDlpDesc": "*yt-dlp (YouTube)*\n\n- /yt | /ytdl `<video link>`: Download an YouTube video\n\nThis command also works with other video platforms! See [this link](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) for more information and which services are supported.\n\n*Note: Telegram is currently limiting bot uploads to 50MB, which means that if the video you want to download is larger than 50MB, the quality will be reduced to try to upload it anyway. We're trying our best to work around or fix this problem.*",
|
||||||
"goBack": "Back",
|
"goBack": "Back",
|
||||||
"maInvalidModule": "Please provide a valid module ID from The Mod Archive.\nExample: `/modarchive 81574`",
|
"maInvalidModule": "Please provide a valid module ID from The Mod Archive.\nExample: `/modarchive 81574`",
|
||||||
"maDownloadError": "Error downloading the file. Check the module ID and try again.",
|
"maDownloadError": "Error downloading the file. Check the module ID and try again.",
|
||||||
|
@ -50,11 +50,13 @@
|
|||||||
"mainCommands": "Comandos principais",
|
"mainCommands": "Comandos principais",
|
||||||
"mainCommandsDesc": "*Comandos principais*\n\n- /help: Exibe a ajuda do bot\n- /start: Inicia o bot\n- /privacy: Leia a política de privacidade do bot",
|
"mainCommandsDesc": "*Comandos principais*\n\n- /help: Exibe a ajuda do bot\n- /start: Inicia o bot\n- /privacy: Leia a política de privacidade do bot",
|
||||||
"usefulCommands": "Comandos úteis",
|
"usefulCommands": "Comandos úteis",
|
||||||
"usefulCommandsDesc": "*Comandos úteis*\n\n- /chatinfo: Envia informações sobre o grupo\n- /userinfo: Envia informações sobre você\n- /d | /device `<modelo>`: Pesquisa um dispositivo no GSMArena e mostra suas especificações.\n- /weather | /clima `<cidade>`: Veja o status do clima para uma localização específica\n- /modarchive | /tma `<id do módulo>`: Baixa um módulo do The Mod Archive.\n- /yt `<link do vídeo>`: Baixa um vídeo do YouTube. (funciona para outras plataformas também, ver https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)",
|
"usefulCommandsDesc": "*Comandos úteis*\n\n- /chatinfo: Envia informações sobre o grupo\n- /userinfo: Envia informações sobre você\n- /d | /device `<modelo>`: Pesquisa um dispositivo no GSMArena e mostra suas especificações.\n- /weather | /clima `<cidade>`: Veja o status do clima para uma localização específica\n- /modarchive | /tma `<id do módulo>`: Baixa um módulo do The Mod Archive.",
|
||||||
"funnyCommands": "Comandos engraçados",
|
"funnyCommands": "Comandos engraçados",
|
||||||
"funnyCommandsDesc": "*Comandos engraçados*\n\n- /gay: Verifique se você é gay\n- /furry: Verifique se você é furry\n- /random: Escolhe um número aleatório entre 0-10\n- /soggy `<1 | 2 | 3 | 4 | orig | thumb | sticker | alt>`: Envia o meme [Soggy cat](https://knowyourmeme.com/memes/soggy-cat)",
|
"funnyCommandsDesc": "*Comandos engraçados*\n\n- /gay: Verifique se você é gay\n- /furry: Verifique se você é furry\n- /random: Escolhe um número aleatório entre 0-10\n- /soggy `<1 | 2 | 3 | 4 | orig | thumb | sticker | alt>`: Envia o meme [Soggy cat](https://knowyourmeme.com/memes/soggy-cat)",
|
||||||
"interactiveEmojis": "Emojis interativos",
|
"interactiveEmojis": "Emojis interativos",
|
||||||
"interactiveEmojisDesc": "*Emojis interativos*\n\n- /dice: Jogue um dado\n- /idice: Role infinitamente um dado colorido\n- /slot: Tente combinar as figuras!\n- /ball: Tente chutar a bola no gol!\n- /bowling: Tente derrubar os pinos!\n- /dart: Tente acertar o alvo!",
|
"interactiveEmojisDesc": "*Emojis interativos*\n\n- /dice: Jogue um dado\n- /idice: Role infinitamente um dado colorido\n- /slot: Tente combinar as figuras!\n- /ball: Tente chutar a bola no gol!\n- /bowling: Tente derrubar os pinos!\n- /dart: Tente acertar o alvo!",
|
||||||
|
"ytDlp": "yt-dlp (YouTube)",
|
||||||
|
"ytDlpDesc": "*yt-dlp (YouTube)*\n\n- /yt | /ytdl `<link do vídeo>`: Baixa um vídeo do YouTube.\n\nEsse comando também funciona com outras plataformas de vídeo! Consulte [este link](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) para obter mais informações e saber quais serviços são compatíveis.\n\n*Nota: O Telegram está atualmente limitando os uploads de bots a 50MB, o que significa que se o vídeo que você deseja baixar for maior que 50MB, a qualidade será reduzida para tentar carregá-lo de qualquer maneira. Estamos fazendo o possível para contornar ou corrigir esse problema.*",
|
||||||
"goBack": "Voltar",
|
"goBack": "Voltar",
|
||||||
"maInvalidModule": "Por favor, forneça um ID de módulo válido do The Mod Archive.\nExemplo: `/modarchive 81574`",
|
"maInvalidModule": "Por favor, forneça um ID de módulo válido do The Mod Archive.\nExemplo: `/modarchive 81574`",
|
||||||
"maDownloadError": "Erro ao baixar o arquivo. Verifique o ID do módulo e tente novamente.",
|
"maDownloadError": "Erro ao baixar o arquivo. Verifique o ID do módulo e tente novamente.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user