From 290a082207faa94dea0f468ef0cab793e1e2cae9 Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Sun, 14 Mar 2021 21:13:36 +0000 Subject: feat: add new discord.py tags --- bot/resources/tags/customhelp.md | 3 +++ bot/resources/tags/intents.md | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 bot/resources/tags/customhelp.md create mode 100644 bot/resources/tags/intents.md diff --git a/bot/resources/tags/customhelp.md b/bot/resources/tags/customhelp.md new file mode 100644 index 000000000..b787fe673 --- /dev/null +++ b/bot/resources/tags/customhelp.md @@ -0,0 +1,3 @@ +**Custom help commands in discord.py** + +To learn more about how to create custom help commands in discord.py by subclassing the help command, please see [this tutorial](https://gist.github.com/InterStella0/b78488fb28cadf279dfd3164b9f0cf96#embed-minimalhelpcommand) by Stella#2000 \ No newline at end of file diff --git a/bot/resources/tags/intents.md b/bot/resources/tags/intents.md new file mode 100644 index 000000000..642e65764 --- /dev/null +++ b/bot/resources/tags/intents.md @@ -0,0 +1,19 @@ +**Using intents in discord.py** + +Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default discord.py has all intents enabled, except for the `Members` and `Presences` intents, which are needed for events such as `on_member` and to get members' statuses. + +To enable one of these intents you need to first to to the [Discord developer portal](https://discord.com/developers/applications), then to the bot page of your bot's application. Scroll down to the `Privileged Gateway Intents` section, and enable the intents that you need. + +Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the `intents` keyword argument, like this: + +```py +from discord import Intents +from discord.ext import commands + +intents = Intents.default() +intents.members = True + +bot = commands.Bot(command_prefix="!", intents=intents) +``` + +For more info about using intents, see the [discord.py docs on intents.](https://discordpy.readthedocs.io/en/latest/intents.html) \ No newline at end of file -- cgit v1.2.3 From 39b4da6a242a96ac298119d60f89bf2af69a952f Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Sun, 14 Mar 2021 21:16:42 +0000 Subject: fix: add newline file endings --- bot/resources/tags/customhelp.md | 2 +- bot/resources/tags/intents.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/resources/tags/customhelp.md b/bot/resources/tags/customhelp.md index b787fe673..6f0b17642 100644 --- a/bot/resources/tags/customhelp.md +++ b/bot/resources/tags/customhelp.md @@ -1,3 +1,3 @@ **Custom help commands in discord.py** -To learn more about how to create custom help commands in discord.py by subclassing the help command, please see [this tutorial](https://gist.github.com/InterStella0/b78488fb28cadf279dfd3164b9f0cf96#embed-minimalhelpcommand) by Stella#2000 \ No newline at end of file +To learn more about how to create custom help commands in discord.py by subclassing the help command, please see [this tutorial](https://gist.github.com/InterStella0/b78488fb28cadf279dfd3164b9f0cf96#embed-minimalhelpcommand) by Stella#2000 diff --git a/bot/resources/tags/intents.md b/bot/resources/tags/intents.md index 642e65764..9171b2314 100644 --- a/bot/resources/tags/intents.md +++ b/bot/resources/tags/intents.md @@ -16,4 +16,4 @@ intents.members = True bot = commands.Bot(command_prefix="!", intents=intents) ``` -For more info about using intents, see the [discord.py docs on intents.](https://discordpy.readthedocs.io/en/latest/intents.html) \ No newline at end of file +For more info about using intents, see the [discord.py docs on intents.](https://discordpy.readthedocs.io/en/latest/intents.html) -- cgit v1.2.3 From b8a74372c6f37c2eda28272195a96668d324844d Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Sun, 14 Mar 2021 21:44:13 +0000 Subject: fix: minor spelling correction --- bot/resources/tags/intents.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/intents.md b/bot/resources/tags/intents.md index 9171b2314..0e94520a8 100644 --- a/bot/resources/tags/intents.md +++ b/bot/resources/tags/intents.md @@ -2,7 +2,7 @@ Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default discord.py has all intents enabled, except for the `Members` and `Presences` intents, which are needed for events such as `on_member` and to get members' statuses. -To enable one of these intents you need to first to to the [Discord developer portal](https://discord.com/developers/applications), then to the bot page of your bot's application. Scroll down to the `Privileged Gateway Intents` section, and enable the intents that you need. +To enable one of these intents you need to first go to the [Discord developer portal](https://discord.com/developers/applications), then to the bot page of your bot's application. Scroll down to the `Privileged Gateway Intents` section, and enable the intents that you need. Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the `intents` keyword argument, like this: -- cgit v1.2.3 From 4fc4d1c0d0303ec7c207165bd812aeb1387e58ac Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Sun, 14 Mar 2021 21:51:38 +0000 Subject: fix: more minor spelling/grammar corrections --- bot/resources/tags/intents.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/resources/tags/intents.md b/bot/resources/tags/intents.md index 0e94520a8..6a282bc17 100644 --- a/bot/resources/tags/intents.md +++ b/bot/resources/tags/intents.md @@ -1,8 +1,8 @@ **Using intents in discord.py** -Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default discord.py has all intents enabled, except for the `Members` and `Presences` intents, which are needed for events such as `on_member` and to get members' statuses. +Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default, discord.py has all intents enabled, except for the `Members` and `Presences` intents, which are needed for events such as `on_member` and to get members' statuses. -To enable one of these intents you need to first go to the [Discord developer portal](https://discord.com/developers/applications), then to the bot page of your bot's application. Scroll down to the `Privileged Gateway Intents` section, and enable the intents that you need. +To enable one of these intents, you need to first go to the [Discord developer portal](https://discord.com/developers/applications), then to the bot page of your bot's application. Scroll down to the `Privileged Gateway Intents` section, then enable the intents that you need. Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the `intents` keyword argument, like this: -- cgit v1.2.3 From bd64acac079c564d3fca64519463518f7056dfe2 Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Fri, 26 Mar 2021 17:49:15 +0000 Subject: fix: remove . from the hyperlink Co-authored-by: Joe Banks <20439493+jb3@users.noreply.github.com> --- bot/resources/tags/intents.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/intents.md b/bot/resources/tags/intents.md index 6a282bc17..e08fd1c33 100644 --- a/bot/resources/tags/intents.md +++ b/bot/resources/tags/intents.md @@ -16,4 +16,4 @@ intents.members = True bot = commands.Bot(command_prefix="!", intents=intents) ``` -For more info about using intents, see the [discord.py docs on intents.](https://discordpy.readthedocs.io/en/latest/intents.html) +For more info about using intents, see the [discord.py docs on intents](https://discordpy.readthedocs.io/en/latest/intents.html). -- cgit v1.2.3 From 2cf2402ea51e3a61d319706a95bc4ab633d6b8fc Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Fri, 26 Mar 2021 17:52:07 +0000 Subject: feat: add link to discord dev portal intents section --- bot/resources/tags/intents.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/intents.md b/bot/resources/tags/intents.md index e08fd1c33..464caf0ba 100644 --- a/bot/resources/tags/intents.md +++ b/bot/resources/tags/intents.md @@ -16,4 +16,4 @@ intents.members = True bot = commands.Bot(command_prefix="!", intents=intents) ``` -For more info about using intents, see the [discord.py docs on intents](https://discordpy.readthedocs.io/en/latest/intents.html). +For more info about using intents, see the [discord.py docs on intents](https://discordpy.readthedocs.io/en/latest/intents.html), and for general information about them, see the [Discord developer documentation on intents](https://discord.com/developers/docs/topics/gateway#gateway-intents). -- cgit v1.2.3