mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 04:39:57 +00:00
Fixed some structure related things on ModArchive downloader
This commit is contained in:
parent
ae8bea1001
commit
cda8c0006e
@ -41,17 +41,15 @@ async function downloadModule(moduleId) {
|
||||
module.exports = (bot) => {
|
||||
bot.command(['modarchive', 'tma'], spamwatchMiddleware, async (ctx) => {
|
||||
const Strings = getStrings(ctx.from.language_code);
|
||||
const args = ctx.message.text.split(' ');
|
||||
const moduleId = ctx.message.text.split(' ')[1];
|
||||
|
||||
if (args.length !== 2) {
|
||||
if (moduleId == NaN || null) {
|
||||
return ctx.reply(Strings.maInvalidModule, {
|
||||
parse_mode: "Markdown",
|
||||
reply_to_message_id: ctx.message.message_id
|
||||
});
|
||||
}
|
||||
|
||||
const moduleId = args[1];
|
||||
|
||||
const result = await downloadModule(moduleId);
|
||||
|
||||
if (result) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user