実現したいこと
Python,Discord.pyでhelpコマンドを作っています。
ですがintentsが必要みたいなことが言われます
発生している問題・エラーメッセージ
"ディレクトリ名" line 9, in <module> bot = commands.Bot(command_prefix='/') TypeError: BotBase.__init__() missing 1 required keyword-only argument: 'intents'
該当のソースコード
python
1import discord 2from discord.ext import commands 3 4Intents = discord.Intents.default() 5Intents.members = True 6Intents.message_content = True 7client = discord.Client(intents=Intents) 8 9bot = commands.Bot(command_prefix='/') 10 11@bot.command() 12async def about(ctx, name): 13 about_embed = discord.embed(title="about about") 14 await ctx.send(embed=about_embed) 15 16@client.event 17async def on_ready(): 18 print('ログイン{0.user}'.format(client)) 19 20client.run("token here")
試したこと
intentsをいろいろtrueにしたりしたが効果なし
DiscordのBOTのアカウント自体のintentsは全部onにしている
補足情報(FW/ツールのバージョンなど)
Discord.py,pythonどちらとも常に最新版
VSCodeから実行してます。
回答1件
あなたの回答
tips
プレビュー