【发布时间】:2021-03-31 17:39:03
【问题描述】:
如何在 ID 为 731634178029912096 的特定频道中创建每 2.5 小时运行一次的自动消息代码?
(我对discord.js一无所知)
以下是机器人中当前的代码:
module.exports = {
name: "help",
description: "view all commands and their description",
run: async (message, args) => {
const { commands } = require("../selfbot.js")
const { prefix } = require("../config.json")
let msg = ""
for (command of commands.keys()) {
msg = msg + prefix + "**" + command + "** " + commands.get(command).description + "\n"
}
await message.edit(msg).then(() => {
setTimeout(() => {
message.delete().catch()
}, 10000)
})
}
}
【问题讨论】:
标签: node.js discord discord.js