【发布时间】:2020-12-01 09:11:58
【问题描述】:
所以这是我第一次在 DiscordJS 中编码(或一般编码),我需要一些帮助来让机器人自动在特定频道中发送消息。请问我可以帮忙吗?谢谢!
这是我的代码:
const Discord = require("discord.js");
const client = new Discord.Client();
client.once("ready", () => {
console.log("LemonBot is online!");
});
const express = require("express");
const app = express();
const guildId = "739855462274695188";
const channelId = "739875350594584707";
const message = "!d bump"
client.login(my discord bot token)
【问题讨论】:
-
到目前为止您尝试过什么?你能给我们看一些代码吗?
-
请显示您所做的任何研究。您是否尝试过文档或 discord.js 指南?
-
@Jakye const Discord = require("discord.js"); const client = new Discord.Client(); client.once("ready", () => { console.log("LemonBot 在线!"); });常量表达 = 要求(“表达”);常量应用程序 = 快递(); const guildId = "739855462274695188";常量频道 ID = "739875350594584707"; const message = "!d bump" client.login(my discord bot token)
-
编辑您的问题并在其中包含代码(可以格式化的地方)而不是在评论中。
标签: javascript node.js discord discord.js