discorb 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -0
  3. data/.github/workflows/build_main.yml +2 -2
  4. data/.github/workflows/build_version.yml +1 -1
  5. data/.github/workflows/codeql-analysis.yml +1 -1
  6. data/.github/workflows/lint-push.yml +3 -5
  7. data/.github/workflows/lint.yml +1 -1
  8. data/.github/workflows/spec.yml +30 -0
  9. data/.lefthook/commit-msg/validator.rb +5 -0
  10. data/.rspec +2 -0
  11. data/.rspec_parallel +2 -0
  12. data/.rubocop.yml +43 -6
  13. data/Changelog.md +14 -1
  14. data/Gemfile +14 -8
  15. data/Rakefile +41 -26
  16. data/bin/console +3 -3
  17. data/docs/Examples.md +1 -1
  18. data/docs/application_command.md +138 -46
  19. data/docs/cli/irb.md +2 -2
  20. data/docs/cli/new.md +14 -9
  21. data/docs/cli/run.md +7 -11
  22. data/docs/cli.md +17 -10
  23. data/docs/events.md +209 -211
  24. data/docs/extension.md +1 -2
  25. data/docs/faq.md +0 -1
  26. data/docs/tutorial.md +12 -12
  27. data/docs/voice_events.md +106 -106
  28. data/examples/commands/message.rb +63 -0
  29. data/examples/commands/permission.rb +18 -0
  30. data/examples/commands/slash.rb +44 -0
  31. data/examples/commands/user.rb +51 -0
  32. data/examples/components/authorization_button.rb +2 -2
  33. data/examples/components/select_menu.rb +2 -2
  34. data/examples/extension/main.rb +1 -1
  35. data/examples/extension/message_expander.rb +5 -2
  36. data/examples/simple/eval.rb +2 -2
  37. data/examples/simple/ping_pong.rb +1 -1
  38. data/examples/simple/rolepanel.rb +1 -1
  39. data/examples/simple/shard.rb +1 -1
  40. data/examples/simple/wait_for_message.rb +1 -1
  41. data/exe/discorb +31 -16
  42. data/lefthook.yml +45 -0
  43. data/lib/discorb/allowed_mentions.rb +1 -0
  44. data/lib/discorb/app_command/command.rb +127 -65
  45. data/lib/discorb/app_command/common.rb +25 -0
  46. data/lib/discorb/app_command/handler.rb +115 -33
  47. data/lib/discorb/app_command.rb +2 -1
  48. data/lib/discorb/application.rb +1 -0
  49. data/lib/discorb/asset.rb +1 -2
  50. data/lib/discorb/attachment.rb +1 -1
  51. data/lib/discorb/audit_logs.rb +11 -8
  52. data/lib/discorb/channel/base.rb +108 -0
  53. data/lib/discorb/channel/category.rb +32 -0
  54. data/lib/discorb/channel/container.rb +44 -0
  55. data/lib/discorb/channel/dm.rb +28 -0
  56. data/lib/discorb/channel/guild.rb +245 -0
  57. data/lib/discorb/channel/stage.rb +140 -0
  58. data/lib/discorb/channel/text.rb +345 -0
  59. data/lib/discorb/channel/thread.rb +321 -0
  60. data/lib/discorb/channel/voice.rb +79 -0
  61. data/lib/discorb/channel.rb +2 -1165
  62. data/lib/discorb/client.rb +38 -26
  63. data/lib/discorb/common.rb +2 -1
  64. data/lib/discorb/components/button.rb +2 -1
  65. data/lib/discorb/components/select_menu.rb +4 -2
  66. data/lib/discorb/components/text_input.rb +12 -2
  67. data/lib/discorb/components.rb +1 -1
  68. data/lib/discorb/embed.rb +22 -7
  69. data/lib/discorb/emoji.rb +30 -3
  70. data/lib/discorb/emoji_table.rb +4969 -3
  71. data/lib/discorb/event.rb +29 -4
  72. data/lib/discorb/exe/about.rb +1 -0
  73. data/lib/discorb/exe/irb.rb +2 -4
  74. data/lib/discorb/exe/new.rb +90 -23
  75. data/lib/discorb/exe/run.rb +8 -22
  76. data/lib/discorb/exe/setup.rb +25 -12
  77. data/lib/discorb/exe/show.rb +4 -3
  78. data/lib/discorb/extend.rb +1 -0
  79. data/lib/discorb/extension.rb +6 -3
  80. data/lib/discorb/flag.rb +11 -0
  81. data/lib/discorb/gateway.rb +67 -19
  82. data/lib/discorb/guild.rb +188 -56
  83. data/lib/discorb/guild_template.rb +10 -4
  84. data/lib/discorb/http.rb +16 -9
  85. data/lib/discorb/integration.rb +4 -1
  86. data/lib/discorb/intents.rb +1 -1
  87. data/lib/discorb/interaction/autocomplete.rb +28 -16
  88. data/lib/discorb/interaction/command.rb +36 -12
  89. data/lib/discorb/interaction/components.rb +5 -2
  90. data/lib/discorb/interaction/modal.rb +0 -1
  91. data/lib/discorb/interaction/response.rb +61 -22
  92. data/lib/discorb/interaction/root.rb +13 -13
  93. data/lib/discorb/interaction.rb +1 -0
  94. data/lib/discorb/invite.rb +5 -2
  95. data/lib/discorb/member.rb +25 -5
  96. data/lib/discorb/message.rb +47 -14
  97. data/lib/discorb/message_meta.rb +1 -0
  98. data/lib/discorb/modules.rb +56 -14
  99. data/lib/discorb/presence.rb +2 -2
  100. data/lib/discorb/rate_limit.rb +7 -2
  101. data/lib/discorb/reaction.rb +4 -4
  102. data/lib/discorb/role.rb +19 -4
  103. data/lib/discorb/shard.rb +1 -1
  104. data/lib/discorb/sticker.rb +8 -7
  105. data/lib/discorb/user.rb +2 -1
  106. data/lib/discorb/utils/colored_puts.rb +1 -0
  107. data/lib/discorb/voice_state.rb +10 -6
  108. data/lib/discorb/webhook.rb +36 -24
  109. data/lib/discorb.rb +5 -3
  110. data/po/yard.pot +9 -9
  111. data/sig/discorb.rbs +7232 -7235
  112. metadata +21 -5
  113. data/examples/commands/bookmarker.rb +0 -42
  114. data/examples/commands/hello.rb +0 -10
  115. data/examples/commands/inspect.rb +0 -25
data/docs/events.md CHANGED
@@ -66,12 +66,13 @@ end
66
66
  ### Client events
67
67
 
68
68
  #### `event_receive(event_name, data)`
69
- Fires when an event is received.
70
69
 
71
- | Parameter | Type | Description |
72
- | ---------- | ----- | ----------- |
73
- |`event_name`| Symbol | The name of the event. |
74
- |`data` | Hash | The data of the event. |
70
+ Fires when an event is received.
71
+
72
+ | Parameter | Type | Description |
73
+ | ------------ | ------ | ---------------------- |
74
+ | `event_name` | Symbol | The name of the event. |
75
+ | `data` | Hash | The data of the event. |
75
76
 
76
77
  #### `ready()`
77
78
 
@@ -99,17 +100,17 @@ This is useful for setting up some dependencies, such as the database.
99
100
 
100
101
  Fires when a shard is standby.
101
102
 
102
- | Parameter | Type | Description |
103
- | ---------- | ----- | ----------- |
104
- |`shard` | {Discorb::Shard} | The shard that is standby. |
103
+ | Parameter | Type | Description |
104
+ | --------- | ---------------- | -------------------------- |
105
+ | `shard` | {Discorb::Shard} | The shard that is standby. |
105
106
 
106
107
  #### `shard_resumed(shard)`
107
108
 
108
109
  Fires when a shard is resumed connection.
109
110
 
110
- | Parameter | Type | Description |
111
- | ---------- | ----- | ----------- |
112
- |`shard` | {Discorb::Shard} | The shard that is standby. |
111
+ | Parameter | Type | Description |
112
+ | --------- | ---------------- | -------------------------- |
113
+ | `shard` | {Discorb::Shard} | The shard that is standby. |
113
114
 
114
115
  ### Guild events
115
116
 
@@ -117,69 +118,68 @@ Fires when a shard is resumed connection.
117
118
 
118
119
  Fires when client joins a guild.
119
120
 
120
- | Parameter | Type | Description |
121
- | ---------- | ----- | ----------- |
122
- |`guild` | {Discorb::Guild} | The guild that was joined. |
121
+ | Parameter | Type | Description |
122
+ | --------- | ---------------- | -------------------------- |
123
+ | `guild` | {Discorb::Guild} | The guild that was joined. |
123
124
 
124
125
  #### `guild_available(guild)`
125
126
 
126
127
  Fires when a guild becomes available.
127
128
 
128
- | Parameter | Type | Description |
129
- | ---------- | ----- | ----------- |
130
- |`guild` | {Discorb::Guild} | The guild that became available. |
129
+ | Parameter | Type | Description |
130
+ | --------- | ---------------- | -------------------------------- |
131
+ | `guild` | {Discorb::Guild} | The guild that became available. |
131
132
 
132
133
  #### `guild_update(before, after)`
133
134
 
134
135
  Fires when client updates a guild.
135
136
 
136
- | Parameter | Type | Description |
137
- | ---------- | ----- | ----------- |
138
- |`before` | {Discorb::Guild} | The guild before the update. |
139
- |`after` | {Discorb::Guild} | The guild after the update. |
137
+ | Parameter | Type | Description |
138
+ | --------- | ---------------- | ---------------------------- |
139
+ | `before` | {Discorb::Guild} | The guild before the update. |
140
+ | `after` | {Discorb::Guild} | The guild after the update. |
140
141
 
141
142
  #### `guild_leave(guild)`
142
143
 
143
144
  Fires when client leaves a guild.
144
145
 
145
- | Parameter | Type | Description |
146
- | ---------- | ----- | ----------- |
147
- |`guild` | {Discorb::Guild} | The guild that was left. |
146
+ | Parameter | Type | Description |
147
+ | --------- | ---------------- | ------------------------ |
148
+ | `guild` | {Discorb::Guild} | The guild that was left. |
148
149
 
149
150
  #### `guild_destroy(guild)`
150
151
 
151
152
  Fires when guild is destroyed.
152
153
 
153
- | Parameter | Type | Description |
154
- | ---------- | ----- | ----------- |
155
- |`guild` | {Discorb::Guild} | The guild that was destroyed. |
154
+ | Parameter | Type | Description |
155
+ | --------- | ---------------- | ----------------------------- |
156
+ | `guild` | {Discorb::Guild} | The guild that was destroyed. |
156
157
 
157
158
  #### `guild_integrations_update(guild)`
158
159
 
159
160
  Fires when guild integrations are updated.
160
161
 
161
- | Parameter | Type | Description |
162
- | ---------- | ----- | ----------- |
163
- |`guild` | {Discorb::Guild} | The guild that integrations were updated for. |
162
+ | Parameter | Type | Description |
163
+ | --------- | ---------------- | --------------------------------------------- |
164
+ | `guild` | {Discorb::Guild} | The guild that integrations were updated for. |
164
165
 
165
166
  #### `guild_ban_add(guild, user)`
166
167
 
167
168
  Fires when a user is banned from a guild.
168
169
 
169
-
170
- | Parameter | Type | Description |
171
- | ---------- | ----- | ----------- |
172
- |`guild` | {Discorb::Guild} | The guild that the user was banned from. |
173
- |`user` | {Discorb::User} | The user that was banned. |
170
+ | Parameter | Type | Description |
171
+ | --------- | ---------------- | ---------------------------------------- |
172
+ | `guild` | {Discorb::Guild} | The guild that the user was banned from. |
173
+ | `user` | {Discorb::User} | The user that was banned. |
174
174
 
175
175
  #### `guild_ban_remove(guild, user)`
176
176
 
177
177
  Fires when a user is unbanned from a guild.
178
178
 
179
- | Parameter | Type | Description |
180
- | ---------- | ----- | ----------- |
181
- |`guild` | {Discorb::Guild} | The guild that the user was unbanned from. |
182
- |`user` | {Discorb::User} | The user that was unbanned. |
179
+ | Parameter | Type | Description |
180
+ | --------- | ---------------- | ------------------------------------------ |
181
+ | `guild` | {Discorb::Guild} | The guild that the user was unbanned from. |
182
+ | `user` | {Discorb::User} | The user that was unbanned. |
183
183
 
184
184
  ### Channel events
185
185
 
@@ -187,88 +187,87 @@ Fires when a user is unbanned from a guild.
187
187
 
188
188
  Fires when a channel is created.
189
189
 
190
- | Parameter | Type | Description |
191
- | ---------- | ----- | ----------- |
192
- |`channel` | {Discorb::Channel} | The channel that was created. |
190
+ | Parameter | Type | Description |
191
+ | --------- | ------------------ | ----------------------------- |
192
+ | `channel` | {Discorb::Channel} | The channel that was created. |
193
193
 
194
194
  #### `channel_update(before, after)`
195
195
 
196
196
  Fires when a channel is updated.
197
197
 
198
- | Parameter | Type | Description |
199
- | ---------- | ----- | ----------- |
200
- |`before` | {Discorb::Channel} | The channel before the update. |
201
- |`after` | {Discorb::Channel} | The channel after the update. |
198
+ | Parameter | Type | Description |
199
+ | --------- | ------------------ | ------------------------------ |
200
+ | `before` | {Discorb::Channel} | The channel before the update. |
201
+ | `after` | {Discorb::Channel} | The channel after the update. |
202
202
 
203
203
  #### `channel_delete(channel)`
204
204
 
205
205
  Fires when a channel is deleted.
206
206
 
207
- | Parameter | Type | Description |
208
- | ---------- | ----- | ----------- |
209
- |`channel` | {Discorb::Channel} | The channel that was deleted. |
207
+ | Parameter | Type | Description |
208
+ | --------- | ------------------ | ----------------------------- |
209
+ | `channel` | {Discorb::Channel} | The channel that was deleted. |
210
210
 
211
211
  #### `webhooks_update(event)`
212
212
 
213
213
  Fires when a webhook is updated.
214
214
 
215
- | Parameter | Type | Description |
216
- | ---------- | ----- | ----------- |
217
- |`event` | {Discorb::Gateway::WebhooksUpdateEvent} | The webhook update event. |
215
+ | Parameter | Type | Description |
216
+ | --------- | --------------------------------------- | ------------------------- |
217
+ | `event` | {Discorb::Gateway::WebhooksUpdateEvent} | The webhook update event. |
218
218
 
219
219
  #### `thread_new(thread)`
220
220
 
221
221
  Fires when a thread is created.
222
222
 
223
- | Parameter | Type | Description |
224
- | ---------- | ----- | ----------- |
225
- |`thread` | {Discorb::ThreadChannel} | The thread that was created. |
223
+ | Parameter | Type | Description |
224
+ | --------- | ------------------------ | ---------------------------- |
225
+ | `thread` | {Discorb::ThreadChannel} | The thread that was created. |
226
226
 
227
227
  #### `thread_join(thread)`
228
228
 
229
229
  Fires when client joins a thread.
230
230
 
231
- | Parameter | Type | Description |
232
- | ---------- | ----- | ----------- |
233
- |`thread` | {Discorb::ThreadChannel} | The thread that was joined. |
234
-
231
+ | Parameter | Type | Description |
232
+ | --------- | ------------------------ | --------------------------- |
233
+ | `thread` | {Discorb::ThreadChannel} | The thread that was joined. |
235
234
 
236
235
  #### `thread_delete(thread)`
237
236
 
238
237
  Fires when a thread is deleted.
239
238
 
240
- | Parameter | Type | Description |
241
- | ---------- | ----- | ----------- |
242
- |`thread` | {Discorb::ThreadChannel} | The thread that was deleted. |
239
+ | Parameter | Type | Description |
240
+ | --------- | ------------------------ | ---------------------------- |
241
+ | `thread` | {Discorb::ThreadChannel} | The thread that was deleted. |
243
242
 
244
243
  #### `thread_update(before, after)`
245
244
 
246
245
  Fires when a thread is updated.
247
246
 
248
- | Parameter | Type | Description |
249
- | ---------- | ----- | ----------- |
250
- |`before` | {Discorb::ThreadChannel} | The thread before the update. |
251
- |`after` | {Discorb::ThreadChannel} | The thread after the update. |
247
+ | Parameter | Type | Description |
248
+ | --------- | ------------------------ | ----------------------------- |
249
+ | `before` | {Discorb::ThreadChannel} | The thread before the update. |
250
+ | `after` | {Discorb::ThreadChannel} | The thread after the update. |
252
251
 
253
252
  #### `thread_members_update(thread, added, removed)`
254
253
 
255
254
  Fires when a thread's members are updated.
256
255
 
257
- | Parameter | Type | Description |
258
- | ---------- | ----- | ----------- |
259
- |`thread` | {Discorb::ThreadChannel} | The thread that the members were updated for. |
260
- |`added` | Array<{Discorb::ThreadChannel::Member}> | An array of {Discorb::ThreadChannel::Member} objects that were added to the thread. |
261
- |`removed` | Array<{Discorb::ThreadChannel::Member}> | An array of {Discorb::ThreadChannel::Member} objects that were removed from the thread. |
256
+ | Parameter | Type | Description |
257
+ | --------- | --------------------------------------- | --------------------------------------------------------------------------------------- |
258
+ | `thread` | {Discorb::ThreadChannel} | The thread that the members were updated for. |
259
+ | `added` | Array<{Discorb::ThreadChannel::Member}> | An array of {Discorb::ThreadChannel::Member} objects that were added to the thread. |
260
+ | `removed` | Array<{Discorb::ThreadChannel::Member}> | An array of {Discorb::ThreadChannel::Member} objects that were removed from the thread. |
262
261
 
263
262
  #### `thread_member_update(before, after)`
264
263
 
265
264
  Fires when a thread member is updated.
266
265
 
267
- | Parameter | Type | Description |
268
- | --------- | ----- | ----------- |
269
- |`thread` | {Discorb::ThreadChannel} | The thread that the member was updated for. |
270
- |`before` | {Discorb::ThreadChannel::Member} | The thread member before the update. |
271
- |`after` | {Discorb::ThreadChannel::Member} | The thread member after the update. |
266
+ | Parameter | Type | Description |
267
+ | --------- | -------------------------------- | ------------------------------------------- |
268
+ | `thread` | {Discorb::ThreadChannel} | The thread that the member was updated for. |
269
+ | `before` | {Discorb::ThreadChannel::Member} | The thread member before the update. |
270
+ | `after` | {Discorb::ThreadChannel::Member} | The thread member after the update. |
272
271
 
273
272
  ### Integration events
274
273
 
@@ -276,26 +275,25 @@ Fires when a thread member is updated.
276
275
 
277
276
  Fires when a guild integration is created.
278
277
 
279
- | Parameter | Type | Description |
280
- | ---------- | ----- | ----------- |
281
- |`integration`| {Discorb::Integration}| The created integration. |
278
+ | Parameter | Type | Description |
279
+ | ------------- | ---------------------- | ------------------------ |
280
+ | `integration` | {Discorb::Integration} | The created integration. |
282
281
 
283
282
  #### `integration_update(after)`
284
283
 
285
284
  Fires when a guild integration is updated.
286
285
 
287
-
288
- | Parameter | Type | Description |
289
- | ---------- | ----- | ----------- |
290
- |`after` | {Discorb::Integration}| The integration after the update. |
286
+ | Parameter | Type | Description |
287
+ | --------- | ---------------------- | --------------------------------- |
288
+ | `after` | {Discorb::Integration} | The integration after the update. |
291
289
 
292
290
  #### `integration_delete(integration)`
293
291
 
294
292
  Fires when a guild integration is deleted.
295
293
 
296
- | Parameter | Type | Description |
297
- | ---------- | ----- | ----------- |
298
- |`integration`| {Discorb::Integration}| The deleted integration. |
294
+ | Parameter | Type | Description |
295
+ | ------------- | ---------------------- | ------------------------ |
296
+ | `integration` | {Discorb::Integration} | The deleted integration. |
299
297
 
300
298
  ### Message events
301
299
 
@@ -303,27 +301,27 @@ Fires when a guild integration is deleted.
303
301
 
304
302
  Fires when a message is created.
305
303
 
306
- | Parameter | Type | Description |
307
- | ---------- | ----- | ----------- |
308
- |`message` | {Discorb::Message}| The created message. |
304
+ | Parameter | Type | Description |
305
+ | --------- | ------------------ | -------------------- |
306
+ | `message` | {Discorb::Message} | The created message. |
309
307
 
310
308
  #### `message_update(event)`
311
309
 
312
310
  Fires when a message is updated.
313
311
 
314
- | Parameter | Type | Description |
315
- | ---------- | ----- | ----------- |
316
- |`event` | {Discorb::Gateway::MessageUpdateEvent}| The message after the update. |
312
+ | Parameter | Type | Description |
313
+ | --------- | -------------------------------------- | ----------------------------- |
314
+ | `event` | {Discorb::Gateway::MessageUpdateEvent} | The message after the update. |
317
315
 
318
316
  #### `message_delete(message, channel, guild)`
319
317
 
320
318
  Fires when a message is deleted.
321
319
 
322
- | Parameter | Type | Description |
323
- | ---------- | ----- | ----------- |
324
- |`message` | {Discorb::Message}| The deleted message. |
325
- |`channel` | {Discorb::Channel}| The channel the message was deleted from. |
326
- |`guild` | ?{Discorb::Guild} | The guild the message was deleted from. |
320
+ | Parameter | Type | Description |
321
+ | --------- | ------------------ | ----------------------------------------- |
322
+ | `message` | {Discorb::Message} | The deleted message. |
323
+ | `channel` | {Discorb::Channel} | The channel the message was deleted from. |
324
+ | `guild` | ?{Discorb::Guild} | The guild the message was deleted from. |
327
325
 
328
326
  ##### Note
329
327
 
@@ -334,35 +332,35 @@ This will fire when cached messages are deleted.
334
332
  Fires when a message is deleted.
335
333
  Not like {file:#message_delete} this will fire even message is not cached.
336
334
 
337
- | Parameter | Type | Description |
338
- | ---------- | ----- | ----------- |
339
- |`message_id`| {Discorb::Snowflake} | The deleted message ID. |
340
- |`channel` | {Discorb::Channel}| The channel the message was deleted from. |
341
- |`guild` | ?{Discorb::Guild} | The guild the message was deleted from. |
335
+ | Parameter | Type | Description |
336
+ | ------------ | -------------------- | ----------------------------------------- |
337
+ | `message_id` | {Discorb::Snowflake} | The deleted message ID. |
338
+ | `channel` | {Discorb::Channel} | The channel the message was deleted from. |
339
+ | `guild` | ?{Discorb::Guild} | The guild the message was deleted from. |
342
340
 
343
341
  #### `message_delete_bulk(messages)`
344
342
 
345
343
  Fires when a bulk of messages are deleted.
346
344
 
347
- | Parameter | Type | Description |
348
- | ---------- | ----- | ----------- |
349
- |`messages` | Array<{Discorb::Message}, {Discorb::Gateway::UnknownDeleteBulkMessage}> | The deleted messages. |
345
+ | Parameter | Type | Description |
346
+ | ---------- | ----------------------------------------------------------------------- | --------------------- |
347
+ | `messages` | Array<{Discorb::Message}, {Discorb::Gateway::UnknownDeleteBulkMessage}> | The deleted messages. |
350
348
 
351
349
  #### `message_pin_update(event)`
352
350
 
353
351
  Fires when a message is pinned or unpinned.
354
352
 
355
- | Parameter | Type | Description |
356
- | ---------- | ----- | ----------- |
357
- |`event` | {Discorb::Gateway::MessagePinEvent}| The event object. |
353
+ | Parameter | Type | Description |
354
+ | --------- | ----------------------------------- | ----------------- |
355
+ | `event` | {Discorb::Gateway::MessagePinEvent} | The event object. |
358
356
 
359
357
  #### `typing_start(event)`
360
358
 
361
359
  Fires when a user starts typing.
362
360
 
363
- | Parameter | Type | Description |
364
- | --------- | ----- | ----------- |
365
- |`event` | {Discorb::Gateway::TypingStartEvent}| The event object. |
361
+ | Parameter | Type | Description |
362
+ | --------- | ------------------------------------ | ----------------- |
363
+ | `event` | {Discorb::Gateway::TypingStartEvent} | The event object. |
366
364
 
367
365
  ### Reaction events
368
366
 
@@ -370,33 +368,33 @@ Fires when a user starts typing.
370
368
 
371
369
  Fires when a reaction is added to a message.
372
370
 
373
- | Parameter | Type | Description |
374
- | ---------- | ----- | ----------- |
375
- |`event` | {Discorb::Gateway::ReactionEvent}| The event object. |
371
+ | Parameter | Type | Description |
372
+ | --------- | --------------------------------- | ----------------- |
373
+ | `event` | {Discorb::Gateway::ReactionEvent} | The event object. |
376
374
 
377
375
  #### `reaction_remove(event)`
378
376
 
379
377
  Fires when someone removes a reaction from a message.
380
378
 
381
- | Parameter | Type | Description |
382
- | ---------- | ----- | ----------- |
383
- |`event` | {Discorb::Gateway::ReactionEvent}| The event object. |
379
+ | Parameter | Type | Description |
380
+ | --------- | --------------------------------- | ----------------- |
381
+ | `event` | {Discorb::Gateway::ReactionEvent} | The event object. |
384
382
 
385
383
  #### `reaction_remove_all(event)`
386
384
 
387
385
  Fires when all reactions are removed from a message.
388
386
 
389
- | Parameter | Type | Description |
390
- | ---------- | ----- | ----------- |
391
- |`event` | {Discorb::Gateway::ReactionRemoveAllEvent}| The event object. |
387
+ | Parameter | Type | Description |
388
+ | --------- | ------------------------------------------ | ----------------- |
389
+ | `event` | {Discorb::Gateway::ReactionRemoveAllEvent} | The event object. |
392
390
 
393
391
  #### `reaction_remove_emoji(event)`
394
392
 
395
393
  Fires when a reaction is removed from a message.
396
394
 
397
- | Parameter | Type | Description |
398
- | ---------- | ----- | ----------- |
399
- |`event` | {Discorb::Gateway::ReactionRemoveEmojiEvent}| The event object. |
395
+ | Parameter | Type | Description |
396
+ | --------- | -------------------------------------------- | ----------------- |
397
+ | `event` | {Discorb::Gateway::ReactionRemoveEmojiEvent} | The event object. |
400
398
 
401
399
  ### Role events
402
400
 
@@ -404,26 +402,26 @@ Fires when a reaction is removed from a message.
404
402
 
405
403
  Fires when a role is created.
406
404
 
407
- | Parameter | Type | Description |
408
- | ---------- | ----- | ----------- |
409
- |`role` | {Discorb::Role}| The created role. |
405
+ | Parameter | Type | Description |
406
+ | --------- | --------------- | ----------------- |
407
+ | `role` | {Discorb::Role} | The created role. |
410
408
 
411
409
  #### `role_update(before, after)`
412
410
 
413
411
  Fires when a role is updated.
414
412
 
415
- | Parameter | Type | Description |
416
- | ---------- | ----- | ----------- |
417
- |`before` | {Discorb::Role}| The role before the update. |
418
- |`after` | {Discorb::Role}| The role after the update. |
413
+ | Parameter | Type | Description |
414
+ | --------- | --------------- | --------------------------- |
415
+ | `before` | {Discorb::Role} | The role before the update. |
416
+ | `after` | {Discorb::Role} | The role after the update. |
419
417
 
420
418
  #### `role_remove(role)`
421
419
 
422
420
  Fires when a role is deleted.
423
421
 
424
- | Parameter | Type | Description |
425
- | ---------- | ----- | ----------- |
426
- |`role` | {Discorb::Role}| The deleted role. |
422
+ | Parameter | Type | Description |
423
+ | --------- | --------------- | ----------------- |
424
+ | `role` | {Discorb::Role} | The deleted role. |
427
425
 
428
426
  ### Member events
429
427
 
@@ -435,26 +433,26 @@ These events require the `guild_members` intent.
435
433
 
436
434
  Fires when a member joins a guild.
437
435
 
438
- | Parameter | Type | Description |
439
- | ---------- | ----- | ----------- |
440
- |`member` | {Discorb::Member}| The member that joined. |
436
+ | Parameter | Type | Description |
437
+ | --------- | ----------------- | ----------------------- |
438
+ | `member` | {Discorb::Member} | The member that joined. |
441
439
 
442
440
  #### `member_update(before, after)`
443
441
 
444
442
  Fires when a member is updated.
445
443
 
446
- | Parameter | Type | Description |
447
- | ---------- | ----- | ----------- |
448
- |`before` | {Discorb::Member}| The member before the update. |
449
- |`after` | {Discorb::Member}| The member after the update. |
444
+ | Parameter | Type | Description |
445
+ | --------- | ----------------- | ----------------------------- |
446
+ | `before` | {Discorb::Member} | The member before the update. |
447
+ | `after` | {Discorb::Member} | The member after the update. |
450
448
 
451
449
  #### `member_remove(member)`
452
450
 
453
451
  Fires when a member is removed from a guild.
454
452
 
455
- | Parameter | Type | Description |
456
- | ---------- | ----- | ----------- |
457
- |`member` | {Discorb::Member}| The member that left. |
453
+ | Parameter | Type | Description |
454
+ | --------- | ----------------- | --------------------- |
455
+ | `member` | {Discorb::Member} | The member that left. |
458
456
 
459
457
  ### Role events
460
458
 
@@ -462,26 +460,26 @@ Fires when a member is removed from a guild.
462
460
 
463
461
  Fires when a role is created.
464
462
 
465
- | Parameter | Type | Description |
466
- | ---------- | ----- | ----------- |
467
- |`role` | {Discorb::Role}| The created role. |
463
+ | Parameter | Type | Description |
464
+ | --------- | --------------- | ----------------- |
465
+ | `role` | {Discorb::Role} | The created role. |
468
466
 
469
467
  #### `role_update(before, after)`
470
468
 
471
469
  Fires when a role is updated.
472
470
 
473
- | Parameter | Type | Description |
474
- | ---------- | ----- | ----------- |
475
- |`before` | {Discorb::Role}| The role before the update. |
476
- |`after` | {Discorb::Role}| The role after the update. |
471
+ | Parameter | Type | Description |
472
+ | --------- | --------------- | --------------------------- |
473
+ | `before` | {Discorb::Role} | The role before the update. |
474
+ | `after` | {Discorb::Role} | The role after the update. |
477
475
 
478
476
  #### `role_remove(role)`
479
477
 
480
478
  Fires when a role is deleted.
481
479
 
482
- | Parameter | Type | Description |
483
- | ---------- | ----- | ----------- |
484
- |`role` | {Discorb::Role}| The deleted role. |
480
+ | Parameter | Type | Description |
481
+ | --------- | --------------- | ----------------- |
482
+ | `role` | {Discorb::Role} | The deleted role. |
485
483
 
486
484
  ### Invite events
487
485
 
@@ -489,17 +487,17 @@ Fires when a role is deleted.
489
487
 
490
488
  Fires when an invitation is created.
491
489
 
492
- | Parameter | Type | Description |
493
- | ---------- | ----- | ----------- |
494
- |`invite` | {Discorb::Invite}| The created invite. |
490
+ | Parameter | Type | Description |
491
+ | --------- | ----------------- | ------------------- |
492
+ | `invite` | {Discorb::Invite} | The created invite. |
495
493
 
496
494
  #### `invite_delete(invite)`
497
495
 
498
496
  Fires when an invitation is deleted.
499
497
 
500
- | Parameter | Type | Description |
501
- | ---------- | ----- | ----------- |
502
- |`invite` | {Discorb::Invite}| The deleted invite. |
498
+ | Parameter | Type | Description |
499
+ | --------- | ----------------- | ------------------- |
500
+ | `invite` | {Discorb::Invite} | The deleted invite. |
503
501
 
504
502
  ### Interaction events
505
503
 
@@ -507,64 +505,64 @@ Fires when an invitation is deleted.
507
505
 
508
506
  Fires when an interaction is created. This will fire for all interactions.
509
507
 
510
- | Parameter | Type | Description |
511
- | ---------- | ----- | ----------- |
512
- | `interaction` | {Discorb::Interaction}| The created interaction. |
508
+ | Parameter | Type | Description |
509
+ | ------------- | ---------------------- | ------------------------ |
510
+ | `interaction` | {Discorb::Interaction} | The created interaction. |
513
511
 
514
512
  #### `application_command(interaction)`
515
513
 
516
514
  Fires when an application command is used.
517
515
 
518
- | Parameter | Type | Description |
519
- | ---------- | ----- | ----------- |
520
- | `interaction` | {Discorb::CommandInteraction}| The created interaction. |
516
+ | Parameter | Type | Description |
517
+ | ------------- | ----------------------------- | ------------------------ |
518
+ | `interaction` | {Discorb::CommandInteraction} | The created interaction. |
521
519
 
522
520
  #### `slash_command(interaction)`
523
521
 
524
522
  Fires when a slash command is used.
525
523
 
526
- | Parameter | Type | Description |
527
- | ---------- | ----- | ----------- |
528
- | `interaction` | {Discorb::CommandInteraction::SlashCommand}| The created interaction. |
524
+ | Parameter | Type | Description |
525
+ | ------------- | ----------------------------------------------- | ------------------------ |
526
+ | `interaction` | {Discorb::CommandInteraction::ChatInputCommand} | The created interaction. |
529
527
 
530
528
  #### `message_command(interaction)`
531
529
 
532
530
  Fires when a message command is used.
533
531
 
534
- | Parameter | Type | Description |
535
- | ---------- | ----- | ----------- |
536
- | `interaction` | {Discorb::CommandInteraction::MessageMenuCommand}| The created interaction. |
532
+ | Parameter | Type | Description |
533
+ | ------------- | ------------------------------------------------- | ------------------------ |
534
+ | `interaction` | {Discorb::CommandInteraction::MessageMenuCommand} | The created interaction. |
537
535
 
538
536
  #### `user_command(interaction)`
539
537
 
540
538
  Fires when a user command is used.
541
539
 
542
- | Parameter | Type | Description |
543
- | ---------- | ----- | ----------- |
544
- | `interaction` | {Discorb::CommandInteraction::UserMenuCommand}| The created interaction. |
540
+ | Parameter | Type | Description |
541
+ | ------------- | ---------------------------------------------- | ------------------------ |
542
+ | `interaction` | {Discorb::CommandInteraction::UserMenuCommand} | The created interaction. |
545
543
 
546
544
  #### `button_click(interaction)`
547
545
 
548
546
  Fires when a button is clicked.
549
547
 
550
- | Parameter | Type | Description |
551
- | ---------- | ----- | ----------- |
552
- |`interaction`| {Discorb::MessageComponentInteraction::Button}| The interaction object. |
548
+ | Parameter | Type | Description |
549
+ | ------------- | ---------------------------------------------- | ----------------------- |
550
+ | `interaction` | {Discorb::MessageComponentInteraction::Button} | The interaction object. |
553
551
 
554
552
  #### `select_menu_select(interaction)`
555
553
 
556
554
  Fires when a select menu is selected.
557
555
 
558
- | Parameter | Type | Description |
559
- | ---------- | ----- | ----------- |
560
- |`interaction`| {Discorb::MessageComponentInteraction::SelectMenu}| The interaction object. |
556
+ | Parameter | Type | Description |
557
+ | ------------- | -------------------------------------------------- | ----------------------- |
558
+ | `interaction` | {Discorb::MessageComponentInteraction::SelectMenu} | The interaction object. |
561
559
 
562
560
  #### `form_submit(interaction)`
563
561
 
564
562
  Fires when a form is submitted.
565
563
 
566
- | Parameter | Type | Description |
567
- | ---------- | ----- | ----------- |
564
+ | Parameter | Type | Description |
565
+ | ------------- | --------------------------- | ----------------------- |
568
566
  | `interaction` | {Discorb::ModalInteraction} | The interaction object. |
569
567
 
570
568
  #### `slash_command
@@ -579,42 +577,42 @@ Because it's big, it's documented in {file:docs/voice_events.md}.
579
577
 
580
578
  Fires when a scheduled event is created.
581
579
 
582
- | Parameter | Type | Description |
583
- | ---------- | ----- | ----------- |
584
- | `event` | {Discorb::ScheduledEvent}| The created scheduled event. |
580
+ | Parameter | Type | Description |
581
+ | --------- | ------------------------- | ---------------------------- |
582
+ | `event` | {Discorb::ScheduledEvent} | The created scheduled event. |
585
583
 
586
584
  #### `scheduled_event_cancel(event)`, `scheduled_event_delete(event)`
587
585
 
588
586
  Fires when a scheduled event is canceled or deleted.
589
587
 
590
- | Parameter | Type | Description |
591
- | ---------- | ----- | ----------- |
592
- | `event` | {Discorb::ScheduledEvent}| The deleted scheduled event. |
588
+ | Parameter | Type | Description |
589
+ | --------- | ------------------------- | ---------------------------- |
590
+ | `event` | {Discorb::ScheduledEvent} | The deleted scheduled event. |
593
591
 
594
592
  #### `scheduled_event_edit(before, after)`
595
593
 
596
594
  Fires when a scheduled event is edited.
597
595
 
598
- | Parameter | Type | Description |
599
- | ---------- | ----- | ----------- |
600
- | `before` | {Discorb::ScheduledEvent}| The scheduled event before the edit. |
601
- | `after` | {Discorb::ScheduledEvent}| The scheduled event after the edit. |
596
+ | Parameter | Type | Description |
597
+ | --------- | ------------------------- | ------------------------------------ |
598
+ | `before` | {Discorb::ScheduledEvent} | The scheduled event before the edit. |
599
+ | `after` | {Discorb::ScheduledEvent} | The scheduled event after the edit. |
602
600
 
603
601
  #### `scheduled_event_start(event)`
604
602
 
605
603
  Fires when a scheduled event is started.
606
604
 
607
- | Parameter | Type | Description |
608
- | ---------- | ----- | ----------- |
609
- | `event` | {Discorb::ScheduledEvent}| The scheduled event that started. |
605
+ | Parameter | Type | Description |
606
+ | --------- | ------------------------- | --------------------------------- |
607
+ | `event` | {Discorb::ScheduledEvent} | The scheduled event that started. |
610
608
 
611
609
  #### `scheduled_event_end(event)`
612
610
 
613
611
  Fires when a scheduled event is ended.
614
612
 
615
- | Parameter | Type | Description |
616
- | ---------- | ----- | ----------- |
617
- | `event` | {Discorb::ScheduledEvent}| The scheduled event that ended. |
613
+ | Parameter | Type | Description |
614
+ | --------- | ------------------------- | ------------------------------- |
615
+ | `event` | {Discorb::ScheduledEvent} | The scheduled event that ended. |
618
616
 
619
617
  ### Low-level events
620
618
 
@@ -622,31 +620,31 @@ Fires when a scheduled event is ended.
622
620
 
623
621
  Fires when `GUILD_CREATE` is received.
624
622
 
625
- | Parameter | Type | Description |
626
- | ---------- | ----- | ----------- |
627
- |`guild` | {Discorb::Guild}| The guild of the event. |
623
+ | Parameter | Type | Description |
624
+ | --------- | ---------------- | ----------------------- |
625
+ | `guild` | {Discorb::Guild} | The guild of the event. |
628
626
 
629
627
  #### `guild_delete(guild)`
630
628
 
631
629
  Fires when `GUILD_DELETE` is received.
632
630
 
633
- | Parameter | Type | Description |
634
- | ---------- | ----- | ----------- |
635
- |`guild` | {Discorb::Guild}| The guild of the event. |
631
+ | Parameter | Type | Description |
632
+ | --------- | ---------------- | ----------------------- |
633
+ | `guild` | {Discorb::Guild} | The guild of the event. |
636
634
 
637
635
  #### `thread_create(thread)`
638
636
 
639
637
  Fires when `THREAD_CREATE` is received.
640
638
 
641
- | Parameter | Type | Description |
642
- | ---------- | ----- | ----------- |
643
- |`thread` | {Discorb::ThreadChannel}| The thread of the event. |
639
+ | Parameter | Type | Description |
640
+ | --------- | ------------------------ | ------------------------ |
641
+ | `thread` | {Discorb::ThreadChannel} | The thread of the event. |
644
642
 
645
643
  #### `scheduled_event_update(before, after)`
646
644
 
647
645
  Fires when `SCHEDULED_EVENT_UPDATE` is received.
648
646
 
649
- | Parameter | Type | Description |
650
- | ---------- | ----- | ----------- |
651
- | `before` | {Discorb::ScheduledEvent}| The scheduled event before the update. |
652
- |`after` | {Discorb::ScheduledEvent}| The scheduled event after the update. |
647
+ | Parameter | Type | Description |
648
+ | --------- | ------------------------- | -------------------------------------- |
649
+ | `before` | {Discorb::ScheduledEvent} | The scheduled event before the update. |
650
+ | `after` | {Discorb::ScheduledEvent} | The scheduled event after the update. |