机器人对命令没有反应

时间:2019-03-04 13:27:05

标签: bots discord

我开始为了娱乐而编写不和谐的bot,并希望制作一个可以显示人们信息的信息bot。但是由于某种原因,一旦我打开它,机器人就没有反应 谢谢

代码:

const Discord = require('discord.js'); 
const client = new Discord.Client();
let PREFIX = '-'
client.on('message', message => { 
    if (message.content.startsWith(PREFIX + 'Userinfo')) {
        const UserInfo = new Discord.MessageEmbed()          
            .setAuthor(message.author.username, message.author.avatarURL()) 
            .setTitle('UserInfo')
            .setURL('www.google.com') 
            .setColor('RANDOM') 
            .setImage(message.author.avatarURL()) 
            .setThumbnail(message.author.avatarURL()) 
            .addField('Avatar', message.author.avatar, true) 
            .addField('AvatarURL', message.author.avatarURL({
                format: 'png'
            }), true) 
            .addField('AvatarURL', message.author.avatarURL({
                size: '2048'
            }), true)
            .addField('Bot', message.author.bot, true) 
            .addField('Created At', message.author.createdAt, false) 
            .addField('Discrim', message.author.discriminator, true) 
            .addField('DMChannel', message.author.dmChannel) 
            .addField('ID', message.author.id) 
            .addField('Last Message', message.author.lastMessage) 
            .addField('Last Message ID', message.author.lastMessageID) 
            .addField('Presence', message.author.presence) 
            .addField('Presence Status', message.author.presence.status) 
            .addField('Presence Game', message.author.presence.activity.name) 
            .addField('Tag', message.author.tag)
            .addField('Username', message.author.username) 
            .addField('Nick Name', message.guild.member(target).displayName) 
            .setFooter('Requested By', message.author.tag) 
            .setTimestamp() 

        message.channel.send(UserInfo);
    }
});
client.login('TOKEN');

0 个答案:

没有答案