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

公會成員添加不起作用(discordjs)

Guild Member Add does not work (discordjs)(公會成員添加不起作用(discordjs))
本文介紹了公會成員添加不起作用(discordjs)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個代碼,如果有人加入機器人會發出歡迎消息,但當用戶加入時,機器人不會發出歡迎消息.

I have a code where if someone joins the bot gives a welcome message but when a user joins, the bot does not give the welcome message.

代碼:

bot.on('guildMemberAdd', member => {

    const channel = member.guild.channels.cache.find(channel => channel.name === "general")
    if (!channel) return;

    const joinembed = new Discord.MessageEmbed()
    .setTitle(`A new member just arrived!`)
    .setDescription(`Welcome ${member} we hope you enjoy your stay here!`)
    .setColor("#FF0000")

    channel.send(joinembed)
});

我的機器人擁有所有權限并且位于角色層次結構的最頂端,請幫助我不知道我做錯了什么.當用戶離開時也會出現此問題(它也不會給出歡迎消息)

My bot has all the permissions and is at the very top of the role hierarchy, please help I don't know what am I doing wrong. This problem also applies when the user leaves (It also does not give the welcome message)

推薦答案

Discord 前幾天做了一些改動.該機器人未發送歡迎消息,因為它從未收到 guildMemberAdd 事件.從現在開始,要獲得這些類型的事件,您必須在開發門戶中打開意圖.完成此操作后,您的代碼將重新開始工作.

Discord made some changes a few days ago. The bot is not sending the welcome message because it never gets the guildMemberAdd event. From now on to get these types of events you will have to turn the intents on in the dev portal. After doing this your code will start working again.

這篇關于公會成員添加不起作用(discordjs)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Using discord.js to detect image and respond(使用 discord.js 檢測圖像并響應)
Check if user ID exists in Discord server(檢查 Discord 服務器中是否存在用戶 ID)
Creating my first bot using REPLIT but always error Discord.JS(使用 REPLIT 創建我的第一個機器人,但總是錯誤 Discord.JS)
How do I code event/command handlers for my Discord.js bot?(如何為我的 Discord.js 機器人編寫事件/命令處理程序?)
How to find a User ID from a Username in Discord.js?(如何從 Discord.js 中的用戶名中查找用戶 ID?)
DeprecationWarning: Collection#find: pass a function instead(DeprecationWarning: Collection#find: 傳遞一個函數)
主站蜘蛛池模板: 精品国产91乱码一区二区三区 | 亚洲国产aⅴ精品 | 一区二区福利视频 | 国产精品中文字幕在线 | 国产自产c区 | 99免费在线视频 | 日韩一区二区av | 一区二区三区中文字幕 | 欧美黄a | 欧美精品二区三区 | 国产精品九九 | 久久33 | 久久av一区二区三区 | 91视视频在线观看入口直接观看 | 国产伦一区二区三区 | 二区视频 | 日韩一区在线播放 | 特一级黄色毛片 | 香蕉久久a毛片 | 综合色站导航 | h视频免费看 | 99免费视频 | 亚洲色图50p | 成人毛片在线视频 | 操操网站 | 国产精品一区久久久 | 日韩av资源站 | 在线欧美视频 | 国产日韩欧美精品一区二区 | 国产久视频 | 日韩高清黄色 | 亚洲中午字幕 | 永久网站 | 久久一热 | 在线观看成人免费视频 | 国产91网址 | 欧美激情在线精品一区二区三区 | 欧美国产日韩一区二区三区 | 国产久| 在线视频一区二区 | 国产一区二区影院 |