例如,無論何時用戶使用該!notification命令,它都應該在控制臺中列印服務器的通知設定是否設定為"all messages"或"only @mentions"。
這是我想用它來做什么的想法。
@bot.command()
async def notification():
notificationsettings = #notification settings here
if notificationsettings == "only @mentions":
print("You'll only get mention notifications")
else:
print("You'll get every message notifications")

uj5u.com熱心網友回復:
公會的通知等級可以通過Guild.default_notifications屬性找到。這將回傳一個NotificationLevel物件。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/483171.html
下一篇:通過函式更改熊貓資料框中的布林值
