aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Canttuchdiz <[email protected]>2023-05-05 06:11:47 -0400
committerGravatar GitHub <[email protected]>2023-05-05 10:11:47 +0000
commit1cf9b6cbc09ba78cea5f7b22d94bac6ccf7a900b (patch)
tree084784a752b7321416673d9fbe2d4722d0cd74d3
parentBump pip-licenses from 4.3.0 to 4.3.1 (#2579) (diff)
Message content intent tag (#2566)
* Incorported message content intent tag. * Updated tag. * Update bot/resources/tags/mcintent.md Co-authored-by: Robin <[email protected]> * Update bot/resources/tags/mcintent.md Co-authored-by: Robin <[email protected]> * Update bot/resources/tags/mcintent.md Co-authored-by: Robin <[email protected]> * Update bot/resources/tags/mcintent.md Co-authored-by: Robin <[email protected]> * Update bot/resources/tags/mcintent.md Co-authored-by: Robin <[email protected]> * Update mcintent.md * Update mcintent.md * Update bot/resources/tags/mcintent.md Co-authored-by: wookie184 <[email protected]> * Changed name. * Added aliases. * Update bot/resources/tags/message-content-intent.md * Update bot/resources/tags/message-content-intent.md Co-authored-by: Daniel Gu <[email protected]> --------- Co-authored-by: Robin <[email protected]> Co-authored-by: wookie184 <[email protected]> Co-authored-by: Daniel Gu <[email protected]>
-rw-r--r--bot/resources/tags/message-content-intent.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/bot/resources/tags/message-content-intent.md b/bot/resources/tags/message-content-intent.md
new file mode 100644
index 000000000..c304ab0fb
--- /dev/null
+++ b/bot/resources/tags/message-content-intent.md
@@ -0,0 +1,19 @@
+---
+aliases: ["mcintent", "message_content", "message_content_intent"]
+embed:
+ title: "Discord Message Content Intent"
+---
+
+The Discord gateway only dispatches events you subscribe to, which you can configure by using "intents."
+
+The message content intent is what determines if an app will receive the actual content of newly created messages. Without this intent, discord.py won't be able to detect prefix commands, so prefix commands won't respond.
+
+Privileged intents, such as message content, have to be explicitly enabled from the [Discord Developer Portal](https://discord.com/developers/applications) in addition to being enabled in the code:
+
+```py
+intents = discord.Intents.default() # create a default Intents instance
+intents.message_content = True # enable message content intents
+
+bot = commands.Bot(command_prefix="!", intents=intents) # actually pass it into the constructor
+```
+For more information on intents, see `/tag intents`. If prefix commands are still not working, see `/tag on-message-event`.