久久久久久久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í)的歡迎消息)
主站蜘蛛池模板: 99视频在线免费观看 | 国产欧美精品一区二区色综合 | 伊人久久综合 | 在线91| 天天操夜夜艹 | 天天射中文 | 一区二区三区四区免费视频 | 国产成人福利视频在线观看 | 亚洲福利一区二区 | 伊人中文字幕 | 日韩成人av在线播放 | 久久99久久99久久 | 国产成人自拍av | 国产午夜高清 | 日日操日日干 | 福利视频一区 | 精品美女久久久久久免费 | 国产精品国产成人国产三级 | 91麻豆精品一区二区三区 | 日韩欧美视频 | 欧美日韩成人 | 日本不卡在线观看 | 九九九视频在线 | 久草青青草 | 日韩精品视频一区二区三区 | 欧美在线一区二区三区 | 黄色大片毛片 | 久久一区视频 | 国内精品久久久久久久 | av中文字幕在线观看 | 午夜视频网站 | 亚洲国产成人久久久 | 亚洲国产视频一区二区 | 久久高清国产视频 | 日韩欧美在线观看 | 日韩欧美在线视频 | 在线一区二区三区 | 久久网一区二区 | 中文字幕人成乱码在线观看 | 色99视频| 久久高清精品 |