久久久久久久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: 傳遞一個函數)
主站蜘蛛池模板: www.在线播放 | 国产欧美在线观看 | av大全在线观看 | 97在线免费视频 | 欧美aaaaa | 操操av | 中文字幕不卡 | 女子spa高潮呻吟抽搐 | 日韩国产精品视频 | 在线一级片| 亚洲免费在线观看 | 日韩黄色网址 | 中文字幕1区 | 激情网五月天 | 国产激情在线视频 | 成人午夜在线观看 | 五月天婷婷社区 | 中文字幕免费在线 | 欧美一区二区三区视频 | 超碰免费在线播放 | 好吊视频一区二区三区四区 | 欧美视频在线一区 | 特黄一级毛片 | 黄色影视在线观看 | 182tv午夜 | 男男av| 国产性生活 | 高清视频一区二区 | 欧美日韩免费在线 | 少妇中文字幕 | 日韩黄色在线 | 午夜快播 | 国产香蕉av | 欧美成人一级 | 日韩成人在线免费观看 | 一区二区三区四区在线播放 | 久久久久久久久国产精品 | 天天色天天干天天 | 日韩伦理视频 | 伊人成人在线 | 国产精品二区一区二区aⅴ污介绍 |