File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,10 @@ async def on_message(message):
9191import discord
9292from discord.ext import commands
9393
94- bot = commands.Bot(command_prefix = " !" )
94+ intents = discord.Intents.default()
95+ intents.message_content = True
96+
97+ bot = commands.Bot(command_prefix = " !" , intents = intents)
9598
9699@bot.command ()
97100async def ping (ctx ):
@@ -183,7 +186,10 @@ import discord
183186from discord.ext import commands # Import the commands extension
184187# discord.ext.commands are not the same as discord.commands!
185188
186- bot = commands.Bot(command_prefix = " !" ) # You can change the command prefix to whatever you want.
189+ intents = discord.Intents.default() # Defining intents
190+ intents.message_content = True # Adding the message_content intent so that the bot can read user messages
191+
192+ bot = commands.Bot(command_prefix = " !" , intents = intents) # You can change the command prefix to whatever you want.
187193
188194@bot.command () # This is the decorator we use to create a prefixed command.
189195async def ping (ctx ): # This is the function we will use to create the command.
You can’t perform that action at this time.
0 commit comments