解決Discord.py 意圖挑戰
問題:
問題:解決方案:
<code class="python">intents = discord.Intents.default() intents.members = True</code>在您的Python 程式碼中,實例化Intents 物件並啟用成員意圖:
<code class="python">client = commands.Bot(command_prefix=',', intents=intents)</code>將修改後的Intents 物件傳遞給Bot 建構子:
,您必須在Discord 開發者入口網站中啟用特權意圖才能使用成員意圖。
其他資訊:
以上是如何修正 Discord.py `on_member_join` 意圖問題?的詳細內容。更多資訊請關注PHP中文網其他相關文章!