Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit cabf5b6

Browse files
committed
documentation change
1 parent 3bc66a2 commit cabf5b6

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,21 @@ https://pypi.org/project/discord-message-components/
55

66
This is a [discord.py](https://github.com/Rapptz/discord.py) message component extension made by [404kuso](https://github.com/404kuso) and [RedstoneZockt](https://github.com/RedstoneZockt), which you can use until discord.py v2.0 is out
77

8-
We also added override support for the `discord.ext.commands.Bot` client, so you don't have to initialize everything by your own
8+
We also added override support for the `discord.ext.commands.Bot` client, so you don't have to initialize everything on your own
9+
10+
To override the standart Bot client, add the following to your code
11+
12+
```py
13+
from discord.ext import commands
14+
from discord_message_components import override_client
15+
override_client()
16+
17+
client = commands.Bot(...)
18+
```
19+
This will add `.components` and `.slash` to the client, and you don't need the
20+
`extension = Extension(client)` thing anymore
21+
22+
And the standart `TextChannel.send` function is automatically overridden
923

1024
> We got some features for you like **send buttons**, **send select menus**, **receive a press or selection** and **edit messages** with buttons and selection menus and everything is compatible with discord.py
1125

discord_message_components/override.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def override_client():
181181
extension = Extension(client)
182182
```
183183
184-
With overridding
184+
With overriding
185185
186186
```py
187187

docs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
mock
2-
discord.py
2+
discord.py
3+
discord_message_components

0 commit comments

Comments
 (0)