From 640d739deaca88b8a97e791f71272f8c74429c18 Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Fri, 9 Dec 2022 20:09:49 +0700 Subject: [PATCH] fix cloop list --- commands/cloop.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/cloop.js b/commands/cloop.js index fa4ce9a..7f10ebb 100644 --- a/commands/cloop.js +++ b/commands/cloop.js @@ -5,13 +5,13 @@ function list (bot, discord, channeldc, selector, config) { const message = [] if (discord) { - for (const { id, cloop, list } of Object.entries(bot.cloop.list)) { + for (const [index, { command, interval, list }] of Object.entries(bot.cloop.list)) { if (!list) continue - message.push(id) + message.push(index) message.push(' > ') - message.push(`\`${cloop.command}\``) + message.push(`\`${command}\``) message.push(' - ') - message.push(cloop.interval) + message.push(interval) message.push('\n') } @@ -26,13 +26,13 @@ function list (bot, discord, channeldc, selector, config) { message.push({ text: 'Cloops:', color: 'green' }) message.push('\n') - for (const { id, cloop, list } of Object.entries(bot.cloop.list)) { + for (const [index, { command, interval, list }] of Object.entries(bot.cloop.list)) { if (!list) continue - message.push({ text: id, color: 'aqua' }) + message.push({ text: index, color: 'aqua' }) message.push({ text: ' > ', color: 'gold' }) - message.push({ text: cloop.command, color: 'green' }) + message.push({ text: command, color: 'green' }) message.push({ text: ' - ', color: 'gold' }) - message.push({ text: cloop.interval, color: 'green' }) + message.push({ text: interval, color: 'green' }) message.push('\n') }