本文介紹了如何讓 discord.py 意圖發(fā)揮作用?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
我正在嘗試制作一個(gè)機(jī)器人來(lái)歡迎人們使用它所在的服務(wù)器,并且所有代碼都可以正常工作,除了 on_member_join 事件,因?yàn)樗昧诵乱鈭D.我在 Google 上搜索了如何使用這些意圖并嘗試了所有方法,但仍然無(wú)法正常工作.
I am trying to make a bot that welcomes people to the server that it's in and all of the code works except for the on_member_join event because it utilizes the new intents. I googled on how to work with the intents and tried everything but it still isn't working.
intents = discord.Intents.default()
intents.members = True
client = commands.Bot(command_prefix=',', intents = intents)
我該如何解決這個(gè)問(wèn)題?
How do I fix this?
推薦答案
intents = discord.Intents.default()
intents.members = True
client = commands.Bot(command_prefix=',', intents=intents)
您還必須在開(kāi)發(fā)者門(mén)戶(hù)
意圖入門(mén)入門(mén)
這篇關(guān)于如何讓 discord.py 意圖發(fā)揮作用?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!