You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extensions/bridge/index.mdx
+3-8Lines changed: 3 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Let's say that you want to make a command that is both a Slash Command and a Pre
19
19
20
20
This is where the `ext.bridge` module comes in. It allows you to use one callback to make both a Slash Command and a Prefixed Command.
21
21
22
+
22
23
### Example Usage
23
24
24
25
```python
@@ -44,7 +45,6 @@ bot.run("TOKEN")
44
45
hello
45
46
</DiscordInteraction>
46
47
</div>
47
-
48
48
Hello!
49
49
</DiscordMessage>
50
50
@@ -58,7 +58,6 @@ bot.run("TOKEN")
58
58
!hello
59
59
</DiscordInteraction>
60
60
</div>
61
-
62
61
Hello!
63
62
</DiscordMessage>
64
63
</DiscordComponent>
@@ -102,7 +101,6 @@ The cog will automatically split the Bridge Command into their Slash Command and
102
101
hello
103
102
</DiscordInteraction>
104
103
</div>
105
-
106
104
Hello!
107
105
</DiscordMessage>
108
106
@@ -116,7 +114,6 @@ The cog will automatically split the Bridge Command into their Slash Command and
116
114
!hello
117
115
</DiscordInteraction>
118
116
</div>
119
-
120
117
Hello!
121
118
</DiscordMessage>
122
119
@@ -126,7 +123,6 @@ The cog will automatically split the Bridge Command into their Slash Command and
126
123
bye
127
124
</DiscordInteraction>
128
125
</div>
129
-
130
126
Bye!
131
127
</DiscordMessage>
132
128
@@ -140,7 +136,6 @@ The cog will automatically split the Bridge Command into their Slash Command and
140
136
!bye
141
137
</DiscordInteraction>
142
138
</div>
143
-
144
139
Bye!
145
140
</DiscordMessage>
146
141
</DiscordComponent>
@@ -149,6 +144,8 @@ The cog will automatically split the Bridge Command into their Slash Command and
149
144
150
145
You can defer if you want to communicate to the user that your bot is busy processing the command. This is done by using `ctx.defer()`. For the Slash Command implementation, `ctx.defer()` calls the function that gives out a "Bot is thinking" message. For the Prefixed Command implementation, `ctx.defer()` enables the typing indicator.
0 commit comments