aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Diabolical5777 <[email protected]>2022-07-10 20:37:56 +0400
committerGravatar GitHub <[email protected]>2022-07-10 20:37:56 +0400
commitc7b1134cd222541a1d9e56fdc89014f9742eeeaa (patch)
tree6ff4a92e8871b5654d12a857e8b89159cab47dff /pydis_site
parentUpdate subclassing_bot.md (diff)
Update subclassing_bot.md
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md b/pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md
index 93d65b35..e8b5354a 100644
--- a/pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md
+++ b/pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md
@@ -10,7 +10,7 @@ First, a [basic article](https://www.codesdope.com/course/python-subclass-of-a-
Subclassing Bot can be very beneficial as it provides you with more control and customisability of how your bot functions, also allowing you to add extra features, such as custom bot attributes or methods. For example, the default [Context](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context) can be overriden to add more functionality.
There are two ways to subclass `commands.Bot`, as shown below:
-```py
+```python
class CustomBot(commands.Bot):
def __init__(self):
super().__init__(
@@ -35,7 +35,7 @@ token = YOUR_TOKEN_HERE
bot.run(token)
```
Or
-```py
+```python
class CustomBot(commands.Bot):
def __init__(self, *args, **kwargs): # the key-word arguments are not specified here, unlike the example above