即使我没有更改代码,它也停止工作?

时间:2021-01-15 23:48:09

标签: javascript node.js

这段代码之前是有效的,据我所知,我没有对它做任何事情。现在在某些服务器上它可以工作但不显示公会图标但在其他服务器上它什么也不发送。请帮忙。

case 'guildinfo':
        server = message.guild
        membercount = server.memberCount
        servername = server.name
        guildid = server.id
        const guild = message.guild; // Gets guild from the Message object
          if(!guild.available) return; // Stops if unavailable
          await message.guild.members.fetch(message.guild.ownerID) // Fetches owner
          .then(guildMember => sOwner = guildMember) // sOwner is the owner
          serverowner = `${sOwner}`
        let avatar = new Discord.MessageEmbed()
              avatar.setTitle('GUILD INFO')
              avatar.setColor('PURPLE')
              avatar.setFooter(`Requested by: ${message.member ? message.member.displayName : message.author.username}`, message.author.displayAvatarURL()) 
              avatar.setThumbnail(server.iconURL())
              avatar.setDescription(`**Server Name:** ${servername} \n **Guild Owner:** ${serverowner} \n **Member Count:** ${membercount} \n **Guild ID:** ${guildid} `) 
        message.channel.send(avatar)
        break

0 个答案:

没有答案