久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

無法聯(lián)系到成員

Can#39;t reach members(無法聯(lián)系到成員)
本文介紹了無法聯(lián)系到成員的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

這是我在角色中顯示成員的代碼.但是當(dāng)我為一個(gè)有很多成員的角色調(diào)用這個(gè)命令時(shí),它只返回我的名字.我該如何解決?V12

this is my code for displaying members in a role. But when i call this command for a role that has a lot of members in, it only returns my name. How i can fix it? V12

let role;

if(message.mentions.roles.first() || message.guild.roles.cache.get(args[0])) {
    role    = message.mentions.roles.first() || message.guild.roles.cache.get(args[0]);
    if(!role)
        return message.reply("I can't find this role!");
} else {
    let choosenRole = args.slice(0).join(" ");
    if(!choosenRole)
        return message.reply("Please type a role name to check.");

    role = message.guild.roles.cache.find(r => r.name === choosenRole);
    if(!role)
        return message.reply("I can't find this role!");

}

    let inrole = new Discord.MessageEmbed()
    .setColor("#09ba87")
    .setAuthor(`${role.name}(${role.members.size})`)
    .setDescription(`
?` + role.members.map(m => m.user.username + "#" + m.user.discriminator).join("
?"))

    let m = await message.channel.send(inrole);

推薦答案

您好,您的問題是由于 Discord Api 最近網(wǎng)關(guān)更改導(dǎo)致 Guild 緩存為空,您需要啟用這里的意圖是為您解決問題 -

Hey there your issue is because of recent gateway changes of the Discord Api that the Guild cache is empty , you need to enable the intents here is a fix for you -

  • 前往 Discord 開發(fā)者門戶
  • 選擇您的應(yīng)用程序
  • 如果您向下滾動(dòng)一點(diǎn),在 bot 部分內(nèi),您將看到一個(gè)名為 Privileged Gateway Intents
  • 的部分
  • 啟用SERVER MEMBERS INTENT并重啟bot,你會(huì)發(fā)現(xiàn)你的緩存不限于小數(shù)!
  • Head over to Discord Developers Portal
  • Choose your application
  • Inside the bot section if you scroll a little bit down , you will see a section named Privileged Gateway Intents
  • Enable the SERVER MEMBERS INTENT and restart the bot and you will find your cache is not limited to small number!

如果這仍然無效,請(qǐng)嘗試獲取所有公會(huì)成員 - message.guild.members.fetch()在 Discord.js

If this still dosent work try fetching all guild members - message.guild.members.fetch() Learn more about intents at Discord.js

這篇關(guān)于無法聯(lián)系到成員的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機(jī)器人提及發(fā)出該機(jī)器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復(fù)必須使用導(dǎo)入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務(wù)器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復(fù)“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務(wù)器時(shí)的歡迎消息)
主站蜘蛛池模板: 成人激情免费视频 | 天天射视频 | 精品影院| 亚洲女人天堂成人av在线 | 免费看片国产 | 亚洲成人自拍网 | 欧美一级大片免费看 | 国产一区二区三区久久久久久久久 | 中文在线一区二区 | 成人精品网 | 一区二区三区四区在线 | 奇米影视首页 | 精品在线一区 | 无人区国产成人久久三区 | 午夜99 | 日韩视频一区二区 | 成人h视频在线观看 | 日韩精品一区二区三区四区 | 91tv在线观看 | 午夜精品久久久久久久久久久久久 | 成人免费看片又大又黄 | 久久免费精品视频 | 亚洲国产精品成人久久久 | 国产欧美在线观看 | 精品91av| 毛片网站在线观看 | 午夜三区| 一级黄色影片在线观看 | 久久精品国产亚洲一区二区 | 欧美成人免费在线视频 | 欧美极品少妇xxxxⅹ免费视频 | 91极品视频 | 国产999精品久久久久久绿帽 | 国产在线精品一区二区三区 | 欧美性猛交一区二区三区精品 | sese视频在线观看 | 妹子干综合 | 成人自拍视频 | 亚洲一区二区在线 | 国产视频1| 色在线视频网站 |