From d039c40d72d62ec9935025e1c780a02b65f80063 Mon Sep 17 00:00:00 2001 From: Marc13 <83296140+llamaair@users.noreply.github.com> Date: Sat, 3 Jun 2023 12:13:37 +0200 Subject: [PATCH 1/3] Update prefixed-commands.mdx Signed-off-by: Marc13 <83296140+llamaair@users.noreply.github.com> --- docs/extensions/commands/prefixed-commands.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/extensions/commands/prefixed-commands.mdx b/docs/extensions/commands/prefixed-commands.mdx index 90fd8ad4..4a1b2672 100644 --- a/docs/extensions/commands/prefixed-commands.mdx +++ b/docs/extensions/commands/prefixed-commands.mdx @@ -91,7 +91,10 @@ async def on_message(message): import discord from discord.ext import commands -bot = commands.Bot(command_prefix="!") +intents = discord.Intents.default() +intents.message_content = True + +bot = commands.Bot(command_prefix="!", intents=True) @bot.command() async def ping(ctx): From f216473184c408f8b84140caba8edf5fd02e3548 Mon Sep 17 00:00:00 2001 From: Marc13 <83296140+llamaair@users.noreply.github.com> Date: Sat, 3 Jun 2023 12:15:51 +0200 Subject: [PATCH 2/3] Update prefixed-commands.mdx Signed-off-by: Marc13 <83296140+llamaair@users.noreply.github.com> --- docs/extensions/commands/prefixed-commands.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extensions/commands/prefixed-commands.mdx b/docs/extensions/commands/prefixed-commands.mdx index 4a1b2672..1276419f 100644 --- a/docs/extensions/commands/prefixed-commands.mdx +++ b/docs/extensions/commands/prefixed-commands.mdx @@ -94,7 +94,7 @@ from discord.ext import commands intents = discord.Intents.default() intents.message_content = True -bot = commands.Bot(command_prefix="!", intents=True) +bot = commands.Bot(command_prefix="!", intents=intents) @bot.command() async def ping(ctx): From e64b584d072050eab4f3149423a554b656917af1 Mon Sep 17 00:00:00 2001 From: Marc13 <83296140+llamaair@users.noreply.github.com> Date: Sat, 3 Jun 2023 12:20:23 +0200 Subject: [PATCH 3/3] Update prefixed-commands.mdx Signed-off-by: Marc13 <83296140+llamaair@users.noreply.github.com> --- docs/extensions/commands/prefixed-commands.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/extensions/commands/prefixed-commands.mdx b/docs/extensions/commands/prefixed-commands.mdx index 1276419f..2de69a0b 100644 --- a/docs/extensions/commands/prefixed-commands.mdx +++ b/docs/extensions/commands/prefixed-commands.mdx @@ -186,7 +186,10 @@ import discord from discord.ext import commands # Import the commands extension # discord.ext.commands are not the same as discord.commands! -bot = commands.Bot(command_prefix="!") # You can change the command prefix to whatever you want. +intents = discord.Intents.default() #Defining intents +intents.message_content = True # Adding the message_content intent so that the bot can read user messages + +bot = commands.Bot(command_prefix="!", intents=intents) # You can change the command prefix to whatever you want. @bot.command() # This is the decorator we use to create a prefixed command. async def ping(ctx): # This is the function we will use to create the command.