【发布时间】:2021-11-28 21:57:49
【问题描述】:
我正在制作一个机器人,如果机器人 webhook Axiore 社区发送一些随机消息 This is Axiore Community webhook message 并且我希望我的机器人发回消息,我希望它发送消息,我该怎么做? (有时 Axiore 社区 webhook 每 4 小时发送不同的消息)
const Discord = require('discord.js');
const client = new Discord.Client();
const express = require("express");
const app = express()
app.get("/", (req, res) => {
res.send("hello world!")
})
app.listen(3000, () => {
console.log("Protect is already!")
})
client.on('ready', () => {
console.log("is time to ping fruit stock!")
});
client.on("message", message => {
if (message.content === `Current stock`) {
message.channel.send("**New current stock!**")
}
})
client.login(process.env.token)
【问题讨论】:
标签: discord.js