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
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,6 @@ 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
-
23
22
### Example Usage
24
23
25
24
```python
@@ -45,6 +44,7 @@ bot.run("TOKEN")
45
44
hello
46
45
</DiscordInteraction>
47
46
</div>
47
+
48
48
Hello!
49
49
</DiscordMessage>
50
50
@@ -58,6 +58,7 @@ bot.run("TOKEN")
58
58
!hello
59
59
</DiscordInteraction>
60
60
</div>
61
+
61
62
Hello!
62
63
</DiscordMessage>
63
64
</DiscordComponent>
@@ -101,6 +102,7 @@ The cog will automatically split the Bridge Command into their Slash Command and
101
102
hello
102
103
</DiscordInteraction>
103
104
</div>
105
+
104
106
Hello!
105
107
</DiscordMessage>
106
108
@@ -114,6 +116,7 @@ The cog will automatically split the Bridge Command into their Slash Command and
114
116
!hello
115
117
</DiscordInteraction>
116
118
</div>
119
+
117
120
Hello!
118
121
</DiscordMessage>
119
122
@@ -123,6 +126,7 @@ The cog will automatically split the Bridge Command into their Slash Command and
123
126
bye
124
127
</DiscordInteraction>
125
128
</div>
129
+
126
130
Bye!
127
131
</DiscordMessage>
128
132
@@ -136,6 +140,7 @@ The cog will automatically split the Bridge Command into their Slash Command and
136
140
!bye
137
141
</DiscordInteraction>
138
142
</div>
143
+
139
144
Bye!
140
145
</DiscordMessage>
141
146
</DiscordComponent>
@@ -144,8 +149,6 @@ The cog will automatically split the Bridge Command into their Slash Command and
144
149
145
150
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.
146
151
147
-
<!--TODO:Addexampleimagesofdeferringatwork-->
148
-
149
152
### Options
150
153
151
154
Options are pretty straightforward. You just specify them like you do with prefixed commands, and you're all set!
0 commit comments