本文介紹了如何讓 discord.py 意圖發揮作用?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我正在嘗試制作一個機器人來歡迎人們使用它所在的服務器,并且所有代碼都可以正常工作,除了 on_member_join 事件,因為它利用了新意圖.我在 Google 上搜索了如何使用這些意圖并嘗試了所有方法,但仍然無法正常工作.
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)
我該如何解決這個問題?
How do I fix this?
推薦答案
intents = discord.Intents.default()
intents.members = True
client = commands.Bot(command_prefix=',', intents=intents)
您還必須在開發者門戶
意圖入門入門
這篇關于如何讓 discord.py 意圖發揮作用?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!