fix cloop list

This commit is contained in:
ChomeNS 2022-12-09 20:09:49 +07:00
parent bad7207eaf
commit 640d739dea

View file

@ -5,13 +5,13 @@ function list (bot, discord, channeldc, selector, config) {
const message = [] const message = []
if (discord) { 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 if (!list) continue
message.push(id) message.push(index)
message.push(' > ') message.push(' > ')
message.push(`\`${cloop.command}\``) message.push(`\`${command}\``)
message.push(' - ') message.push(' - ')
message.push(cloop.interval) message.push(interval)
message.push('\n') message.push('\n')
} }
@ -26,13 +26,13 @@ function list (bot, discord, channeldc, selector, config) {
message.push({ text: 'Cloops:', color: 'green' }) message.push({ text: 'Cloops:', color: 'green' })
message.push('\n') 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 if (!list) continue
message.push({ text: id, color: 'aqua' }) message.push({ text: index, color: 'aqua' })
message.push({ text: ' > ', color: 'gold' }) 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: ' - ', color: 'gold' })
message.push({ text: cloop.interval, color: 'green' }) message.push({ text: interval, color: 'green' })
message.push('\n') message.push('\n')
} }