我有一个使用Discord.js的不和谐机器人。它可以使用如下代码立即发送消息 message.channel.send('hi') 这对于发送普通消息来说工作得很好,但我想让它看起来像是需要一段时间才能输入(与机器人Chatty Cathy发送类似人类的消息没有什么不同)。 Check it out here 我该如何制作一个像消息一样发送人类时间的机器人呢?
我有一个discord.js自机器人,我试图让它创建一个服务器,任何帮助都是很棒的。
我试过和client.user混在一起,但什么都没找到
另外,如果您不能使用discord.js创建服务器(因为它不是用于自机器人的),我愿意使用外部库(请求、axios等)。
我用的是 (discord.js v12)
client.on('message', message => {
if (message.content === '!createserver') {
// make server here
message.reply('C
.avatarURL for discord.js没有显示任何图像。
我试图为我的不和谐的机器人做一个命令,让别人平另一个,让机器人显示他们的个人资料图片。我很快就发现.avatarURL是解决这个问题的解决方案,但它似乎根本没有显示任何图像。任何帮助都将不胜感激。
if (message.content.startsWith(`${prefix}showpfp`)) {
let embed = new Discord.RichEmbed().setTitle(tMember.displayName + "'s Profile Picture").se
当我尝试在我的discord.js机器人的控制台中运行npm时,我不知道为什么它不能工作。
(这是我的package.json)
{
"name": "spinier-bot",
"version": "1.0.0",
"description": "Moderation & utility bot with a little bit of fun sprinkled in.",
"main": "src/bot.js",
"scr
if (command === 'start') {
// code to excute when discord user types !start
message.channel.send(' like counting started!');
} else if (message.content === ':likeyes:') {
// checks discord user emote
message.channel.send('thanks for like!');
} //outputs text
我正在尝试
我在我的discord.js机器人中有一个踢球命令,我想让机器人向被踢的人发送一个DM。我不能这样做: user.send(message)
target.kick(reason).then((m) => {
// do the other stuff here
}); 使用此代码时,不会发送DM。这就是我所做的: user.send(message).then((msg) => {
target.kick(reason).then((m) => {
// do the othe
我试图将用Node.js制作的不和谐机器人部署到Heroku,构建成功,但应用程序崩溃并抛出一个错误:
Error R10 (Boot timeout)
Web process failed to bind to $PORT within 60 seconds of launch
我的Procfile
web: node app.js
package.json
{
"name": "bot",
"version": "5.0",
"description": "Discord Bot",
我正在使用discord.js制作一个机器人,其中我想向一个特定的成员发送一条消息。
如何才能将消息发送给特定的成员(标识代码为"346176733549953029"),而不是使用message.author.send(“我想发送的文本”)将消息发送给输入命令的人?
我需要这样的东西:
message.user.get("346176733549953029").send("test I want to send");
最终的结果应该是该成员从机器人那里接收到一条私人消息,其中的消息位于.