discorb 0.0.4 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changelog.md +14 -2
- data/Gemfile.lock +1 -1
- data/README.md +4 -3
- data/discorb.gemspec +3 -3
- data/docs/events.md +50 -54
- data/docs/voice_events.md +32 -32
- data/examples/components/authorization_button.rb +2 -2
- data/examples/components/select_menu.rb +2 -2
- data/examples/extension/message_expander.rb +1 -1
- data/examples/simple/eval.rb +2 -2
- data/examples/simple/ping_pong.rb +1 -1
- data/examples/simple/rolepanel.rb +3 -3
- data/examples/simple/wait_for_message.rb +1 -1
- data/lib/discorb/channel.rb +36 -32
- data/lib/discorb/client.rb +11 -11
- data/lib/discorb/common.rb +1 -1
- data/lib/discorb/emoji.rb +2 -2
- data/lib/discorb/gateway.rb +10 -8
- data/lib/discorb/guild.rb +38 -38
- data/lib/discorb/guild_template.rb +3 -3
- data/lib/discorb/{internet.rb → http.rb} +2 -2
- data/lib/discorb/integration.rb +1 -1
- data/lib/discorb/interaction.rb +6 -6
- data/lib/discorb/invite.rb +1 -1
- data/lib/discorb/member.rb +3 -3
- data/lib/discorb/message.rb +11 -11
- data/lib/discorb/modules.rb +7 -7
- data/lib/discorb/role.rb +3 -3
- data/lib/discorb/sticker.rb +2 -2
- data/lib/discorb/user.rb +2 -2
- data/lib/discorb/voice_state.rb +2 -2
- data/lib/discorb/webhook.rb +11 -13
- data/lib/discorb.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b247a62629770b82d8326ac69507603a27bc8cf31bcf7c06a7aa9d546b7e80a
|
4
|
+
data.tar.gz: ec2416663ce7d90e2023c648a115e6a2691f4557394770274dcf4a25489aad36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 511985823e749cec350e08f98cd9b7f05172d00fb02e63756b4c8dadd65657c9a68d775a1309190c14ec72c12ed955a6bfbd7bc23d55307fc90165b5a9d81c63
|
7
|
+
data.tar.gz: ba547c5dc8a1558654ae860be8f426255bf633809acb82b853a14b72ffbbda9b58a6d0bc50c6e2b656233b08672ec78be07a4899436f5c90e162b3a06aa45c5f
|
data/Changelog.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## v0.0.1
|
3
|
+
## v0.0.1
|
4
4
|
|
5
|
-
- Initial release
|
5
|
+
- Initial release
|
6
|
+
|
7
|
+
## v0.0.2
|
8
|
+
|
9
|
+
- Fix: Fix rubygems description
|
10
|
+
|
11
|
+
## v0.0.3
|
12
|
+
|
13
|
+
- Fix: Fix no dependencies
|
14
|
+
|
15
|
+
## v0.0.4
|
16
|
+
|
17
|
+
- Fix: Fix NoMethodError by webhook message
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# discorb
|
2
2
|
[](https://rubydoc.info/gems/discorb)
|
3
3
|
[](https://rubygems.org/gems/discorb)
|
4
|
-
[](https://rubygems.org/gems/discorb)
|
4
|
+
[](https://rubygems.org/gems/discorb)
|
5
|
+
[](https://discord.gg/hCP6zq8Vpj)
|
5
6
|
|
6
7
|
discorb is a Discord API wrapper for Ruby.
|
7
8
|
|
@@ -34,7 +35,7 @@ client.once :ready do
|
|
34
35
|
puts "Logged in as #{client.user}"
|
35
36
|
end
|
36
37
|
|
37
|
-
client.on :message do |
|
38
|
+
client.on :message do |message|
|
38
39
|
next if message.author.bot?
|
39
40
|
next unless message.content == "ping"
|
40
41
|
|
@@ -46,7 +47,7 @@ client.run(ENV["DISCORD_BOT_TOKEN"])
|
|
46
47
|
|
47
48
|
## Contributing
|
48
49
|
|
49
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
50
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/discorb-lib/discorb.
|
50
51
|
|
51
52
|
## License
|
52
53
|
|
data/discorb.gemspec
CHANGED
@@ -9,15 +9,15 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["sevenc-nanashi@sevenbot.jp"]
|
10
10
|
|
11
11
|
spec.summary = "discorb is a Discord API wrapper for Ruby."
|
12
|
-
spec.homepage = "https://github.com/
|
12
|
+
spec.homepage = "https://github.com/discorb-lib/discorb"
|
13
13
|
spec.license = "MIT"
|
14
14
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
15
15
|
|
16
16
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
17
17
|
|
18
18
|
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
-
spec.metadata["source_code_uri"] = "https://github.com/
|
20
|
-
spec.metadata["changelog_uri"] = "https://github.com/
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/discorb-lib/discorb"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/discorb-lib/discorb/blob/main/Changelog.md"
|
21
21
|
|
22
22
|
# Specify which files should be added to the gem when it is released.
|
23
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
data/docs/events.md
CHANGED
@@ -9,7 +9,7 @@ You can register event handlers with {Client#on}.
|
|
9
9
|
Alternatively, you can use {Client#once} to register a one-time event handler.
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
client.on :message do |
|
12
|
+
client.on :message do |event|
|
13
13
|
puts event.message.content
|
14
14
|
end
|
15
15
|
```
|
@@ -18,13 +18,9 @@ This example will print the content of every message received.
|
|
18
18
|
|
19
19
|
## Event reference
|
20
20
|
|
21
|
-
### Note
|
22
|
-
|
23
|
-
`Async::Task` object will be passed to the event handler in the first argument: `task`.
|
24
|
-
|
25
21
|
### Client events
|
26
22
|
|
27
|
-
#### `event_receive(
|
23
|
+
#### `event_receive(event_name, data)`
|
28
24
|
Fires when a event is received.
|
29
25
|
|
30
26
|
| Parameter | Type | Description |
|
@@ -42,7 +38,7 @@ Fires when the client is resumed connection.
|
|
42
38
|
|
43
39
|
### Guild events
|
44
40
|
|
45
|
-
#### `guild_join(
|
41
|
+
#### `guild_join(guild)`
|
46
42
|
|
47
43
|
Fires when client joins a guild.
|
48
44
|
|
@@ -50,7 +46,7 @@ Fires when client joins a guild.
|
|
50
46
|
| ---------- | ----- | ----------- |
|
51
47
|
|`guild` | {Discorb::Guild} | The guild that was joined. |
|
52
48
|
|
53
|
-
#### `guild_available(
|
49
|
+
#### `guild_available(guild)`
|
54
50
|
|
55
51
|
Fires when a guild becomes available.
|
56
52
|
|
@@ -58,7 +54,7 @@ Fires when a guild becomes available.
|
|
58
54
|
| ---------- | ----- | ----------- |
|
59
55
|
|`guild` | {Discorb::Guild} | The guild that became available. |
|
60
56
|
|
61
|
-
#### `guild_update(
|
57
|
+
#### `guild_update(before, after)`
|
62
58
|
|
63
59
|
Fires when client updates a guild.
|
64
60
|
|
@@ -67,7 +63,7 @@ Fires when client updates a guild.
|
|
67
63
|
|`before` | {Discorb::Guild} | The guild before the update. |
|
68
64
|
|`after` | {Discorb::Guild} | The guild after the update. |
|
69
65
|
|
70
|
-
#### `guild_leave(
|
66
|
+
#### `guild_leave(guild)`
|
71
67
|
|
72
68
|
Fires when client leaves a guild.
|
73
69
|
|
@@ -75,7 +71,7 @@ Fires when client leaves a guild.
|
|
75
71
|
| ---------- | ----- | ----------- |
|
76
72
|
|`guild` | {Discorb::Guild} | The guild that was left. |
|
77
73
|
|
78
|
-
#### `guild_destroy(
|
74
|
+
#### `guild_destroy(guild)`
|
79
75
|
|
80
76
|
Fires when guild is destroyed.
|
81
77
|
|
@@ -83,7 +79,7 @@ Fires when guild is destroyed.
|
|
83
79
|
| ---------- | ----- | ----------- |
|
84
80
|
|`guild` | {Discorb::Guild} | The guild that was destroyed. |
|
85
81
|
|
86
|
-
#### `guild_integrations_update(
|
82
|
+
#### `guild_integrations_update(guild)`
|
87
83
|
|
88
84
|
Fires when guild integrations are updated.
|
89
85
|
|
@@ -91,7 +87,7 @@ Fires when guild integrations are updated.
|
|
91
87
|
| ---------- | ----- | ----------- |
|
92
88
|
|`guild` | {Discorb::Guild} | The guild that integrations were updated for. |
|
93
89
|
|
94
|
-
#### `guild_ban_add(
|
90
|
+
#### `guild_ban_add(guild, user)`
|
95
91
|
|
96
92
|
Fires when a user is banned from a guild.
|
97
93
|
|
@@ -101,7 +97,7 @@ Fires when a user is banned from a guild.
|
|
101
97
|
|`guild` | {Discorb::Guild} | The guild that the user was banned from. |
|
102
98
|
|`user` | {Discorb::User} | The user that was banned. |
|
103
99
|
|
104
|
-
#### `guild_ban_remove(
|
100
|
+
#### `guild_ban_remove(guild, user)`
|
105
101
|
|
106
102
|
Fires when a user is unbanned from a guild.
|
107
103
|
|
@@ -112,7 +108,7 @@ Fires when a user is unbanned from a guild.
|
|
112
108
|
|
113
109
|
### Channel events
|
114
110
|
|
115
|
-
#### `channel_create(
|
111
|
+
#### `channel_create(channel)`
|
116
112
|
|
117
113
|
Fires when a channel is created.
|
118
114
|
|
@@ -120,7 +116,7 @@ Fires when a channel is created.
|
|
120
116
|
| ---------- | ----- | ----------- |
|
121
117
|
|`channel` | {Discorb::Channel} | The channel that was created. |
|
122
118
|
|
123
|
-
#### `channel_update(
|
119
|
+
#### `channel_update(before, after)`
|
124
120
|
|
125
121
|
Fires when a channel is updated.
|
126
122
|
|
@@ -129,7 +125,7 @@ Fires when a channel is updated.
|
|
129
125
|
|`before` | {Discorb::Channel} | The channel before the update. |
|
130
126
|
|`after` | {Discorb::Channel} | The channel after the update. |
|
131
127
|
|
132
|
-
#### `channel_delete(
|
128
|
+
#### `channel_delete(channel)`
|
133
129
|
|
134
130
|
Fires when a channel is deleted.
|
135
131
|
|
@@ -137,7 +133,7 @@ Fires when a channel is deleted.
|
|
137
133
|
| ---------- | ----- | ----------- |
|
138
134
|
|`channel` | {Discorb::Channel} | The channel that was deleted. |
|
139
135
|
|
140
|
-
#### `webhooks_update(
|
136
|
+
#### `webhooks_update(event)`
|
141
137
|
|
142
138
|
Fires when a webhook is updated.
|
143
139
|
|
@@ -145,7 +141,7 @@ Fires when a webhook is updated.
|
|
145
141
|
| ---------- | ----- | ----------- |
|
146
142
|
|`event` | {Discorb::WebhooksUpdateEvent} | The webhook update event. |
|
147
143
|
|
148
|
-
#### `thread_new(
|
144
|
+
#### `thread_new(thread)`
|
149
145
|
|
150
146
|
Fires when a thread is created.
|
151
147
|
|
@@ -153,7 +149,7 @@ Fires when a thread is created.
|
|
153
149
|
| ---------- | ----- | ----------- |
|
154
150
|
|`thread` | {Discorb::ThreadChannel} | The thread that was created. |
|
155
151
|
|
156
|
-
#### `thread_join(
|
152
|
+
#### `thread_join(thread)`
|
157
153
|
|
158
154
|
Fires when client joins a thread.
|
159
155
|
|
@@ -162,7 +158,7 @@ Fires when client joins a thread.
|
|
162
158
|
|`thread` | {Discorb::ThreadChannel} | The thread that was joined. |
|
163
159
|
|
164
160
|
|
165
|
-
#### `thread_delete(
|
161
|
+
#### `thread_delete(thread)`
|
166
162
|
|
167
163
|
Fires when a thread is deleted.
|
168
164
|
|
@@ -170,7 +166,7 @@ Fires when a thread is deleted.
|
|
170
166
|
| ---------- | ----- | ----------- |
|
171
167
|
|`thread` | {Discorb::ThreadChannel} | The thread that was deleted. |
|
172
168
|
|
173
|
-
#### `thread_update(
|
169
|
+
#### `thread_update(before, after)`
|
174
170
|
|
175
171
|
Fires when a thread is updated.
|
176
172
|
|
@@ -179,7 +175,7 @@ Fires when a thread is updated.
|
|
179
175
|
|`before` | {Discorb::ThreadChannel} | The thread before the update. |
|
180
176
|
|`after` | {Discorb::ThreadChannel} | The thread after the update. |
|
181
177
|
|
182
|
-
#### `thread_members_update(
|
178
|
+
#### `thread_members_update(thread, added, removed)`
|
183
179
|
|
184
180
|
Fires when a thread's members are updated.
|
185
181
|
|
@@ -189,7 +185,7 @@ Fires when a thread's members are updated.
|
|
189
185
|
|`added` | Array<{ThreadChannel::Member}> | An array of {Discorb::ThreadChannel::Member} objects that were added to the thread. |
|
190
186
|
|`removed` | Array<{ThreadChannel::Member}> | An array of {Discorb::ThreadChannel::Member} objects that were removed from the thread. |
|
191
187
|
|
192
|
-
#### `thread_member_update(
|
188
|
+
#### `thread_member_update(before, after)`
|
193
189
|
|
194
190
|
Fires when a thread member is updated.
|
195
191
|
|
@@ -201,7 +197,7 @@ Fires when a thread member is updated.
|
|
201
197
|
|
202
198
|
### Integration events
|
203
199
|
|
204
|
-
#### `integration_create(
|
200
|
+
#### `integration_create(integration)`
|
205
201
|
|
206
202
|
Fires when a guild integration is created.
|
207
203
|
|
@@ -209,7 +205,7 @@ Fires when a guild integration is created.
|
|
209
205
|
| ---------- | ----- | ----------- |
|
210
206
|
|`integration`| {Discorb::Integration}| The created integration. |
|
211
207
|
|
212
|
-
#### `integration_update(
|
208
|
+
#### `integration_update(before, after)`
|
213
209
|
|
214
210
|
Fires when a guild integration is updated.
|
215
211
|
|
@@ -219,7 +215,7 @@ Fires when a guild integration is updated.
|
|
219
215
|
|`before` | {Discorb::Integration}| The integration before the update. |
|
220
216
|
|`after` | {Discorb::Integration}| The integration after the update. |
|
221
217
|
|
222
|
-
#### `integration_delete(
|
218
|
+
#### `integration_delete(integration)`
|
223
219
|
|
224
220
|
Fires when a guild integration is deleted.
|
225
221
|
|
@@ -229,7 +225,7 @@ Fires when a guild integration is deleted.
|
|
229
225
|
|
230
226
|
### Message events
|
231
227
|
|
232
|
-
#### `message(
|
228
|
+
#### `message(message)`
|
233
229
|
|
234
230
|
Fires when a message is created.
|
235
231
|
|
@@ -237,7 +233,7 @@ Fires when a message is created.
|
|
237
233
|
| ---------- | ----- | ----------- |
|
238
234
|
|`message` | {Discorb::Message}| The created message. |
|
239
235
|
|
240
|
-
#### `message_update(
|
236
|
+
#### `message_update(event)`
|
241
237
|
|
242
238
|
Fires when a message is updated.
|
243
239
|
|
@@ -245,7 +241,7 @@ Fires when a message is updated.
|
|
245
241
|
| ---------- | ----- | ----------- |
|
246
242
|
|`event` | {Discorb::GatewayHandler::MessageUpdateEvent}| The message after the update. |
|
247
243
|
|
248
|
-
#### `message_delete(
|
244
|
+
#### `message_delete(message, channel, guild)`
|
249
245
|
|
250
246
|
Fires when a message is deleted.
|
251
247
|
|
@@ -259,7 +255,7 @@ Fires when a message is deleted.
|
|
259
255
|
|
260
256
|
This will fire when cached messages are deleted.
|
261
257
|
|
262
|
-
#### `message_delete_id(
|
258
|
+
#### `message_delete_id(message_id, channel, guild)`
|
263
259
|
|
264
260
|
Fires when a message is deleted.
|
265
261
|
Not like {#message_delete} this will fire even message is not cached.
|
@@ -270,7 +266,7 @@ Not like {#message_delete} this will fire even message is not cached.
|
|
270
266
|
|`channel` | {Discorb::Channel}| The channel the message was deleted from. |
|
271
267
|
|`guild` | ?{Discorb::Guild} | The guild the message was deleted from. |
|
272
268
|
|
273
|
-
#### `message_delete_bulk(
|
269
|
+
#### `message_delete_bulk(messages)`
|
274
270
|
|
275
271
|
Fires when a bulk of messages are deleted.
|
276
272
|
|
@@ -278,7 +274,7 @@ Fires when a bulk of messages are deleted.
|
|
278
274
|
| ---------- | ----- | ----------- |
|
279
275
|
|`messages` | Array<{Discorb::Message}, {Discorb::GatewayHandler::UnknownDeleteBulkMessage}> | The deleted messages. |
|
280
276
|
|
281
|
-
#### `message_pin_update(
|
277
|
+
#### `message_pin_update(event)`
|
282
278
|
|
283
279
|
Fires when a message is pinned or unpinned.
|
284
280
|
|
@@ -286,7 +282,7 @@ Fires when a message is pinned or unpinned.
|
|
286
282
|
| ---------- | ----- | ----------- |
|
287
283
|
|`event` | {Discorb::GatewayHandler::MessagePinUpdateEvent}| The event object. |
|
288
284
|
|
289
|
-
#### `typing_start(
|
285
|
+
#### `typing_start(event)`
|
290
286
|
|
291
287
|
Fires when a user starts typing.
|
292
288
|
|
@@ -296,7 +292,7 @@ Fires when a user starts typing.
|
|
296
292
|
|
297
293
|
### Reaction events
|
298
294
|
|
299
|
-
#### `reaction_add(
|
295
|
+
#### `reaction_add(event)`
|
300
296
|
|
301
297
|
Fires when a reaction is added to a message.
|
302
298
|
|
@@ -304,7 +300,7 @@ Fires when a reaction is added to a message.
|
|
304
300
|
| ---------- | ----- | ----------- |
|
305
301
|
|`event` | {Discorb::GatewayHandler::ReactionEvent}| The event object. |
|
306
302
|
|
307
|
-
#### `reaction_remove(
|
303
|
+
#### `reaction_remove(event)`
|
308
304
|
|
309
305
|
Fires when someone removes a reaction from a message.
|
310
306
|
|
@@ -312,7 +308,7 @@ Fires when someone removes a reaction from a message.
|
|
312
308
|
| ---------- | ----- | ----------- |
|
313
309
|
|`event` | {Discorb::GatewayHandler::ReactionEvent}| The event object. |
|
314
310
|
|
315
|
-
#### `reaction_remove_all(
|
311
|
+
#### `reaction_remove_all(event)`
|
316
312
|
|
317
313
|
Fires when all reactions are removed from a message.
|
318
314
|
|
@@ -320,7 +316,7 @@ Fires when all reactions are removed from a message.
|
|
320
316
|
| ---------- | ----- | ----------- |
|
321
317
|
|`event` | {Discorb::GatewayHandler::ReactionRemoveAllEvent}| The event object. |
|
322
318
|
|
323
|
-
#### `reaction_remove_emoji(
|
319
|
+
#### `reaction_remove_emoji(event)`
|
324
320
|
|
325
321
|
Fires when a reaction is removed from a message.
|
326
322
|
|
@@ -330,7 +326,7 @@ Fires when a reaction is removed from a message.
|
|
330
326
|
|
331
327
|
### Role events
|
332
328
|
|
333
|
-
#### `role_create(
|
329
|
+
#### `role_create(role)`
|
334
330
|
|
335
331
|
Fires when a role is created.
|
336
332
|
|
@@ -338,7 +334,7 @@ Fires when a role is created.
|
|
338
334
|
| ---------- | ----- | ----------- |
|
339
335
|
|`role` | {Discorb::Role}| The created role. |
|
340
336
|
|
341
|
-
#### `role_update(
|
337
|
+
#### `role_update(before, after)`
|
342
338
|
|
343
339
|
Fires when a role is updated.
|
344
340
|
|
@@ -347,7 +343,7 @@ Fires when a role is updated.
|
|
347
343
|
|`before` | {Discorb::Role}| The role before the update. |
|
348
344
|
|`after` | {Discorb::Role}| The role after the update. |
|
349
345
|
|
350
|
-
#### `role_remove(
|
346
|
+
#### `role_remove(role)`
|
351
347
|
|
352
348
|
Fires when a role is deleted.
|
353
349
|
|
@@ -361,7 +357,7 @@ Fires when a role is deleted.
|
|
361
357
|
|
362
358
|
These events requires the `guild_members` intent.
|
363
359
|
|
364
|
-
#### `member_add(
|
360
|
+
#### `member_add(member)`
|
365
361
|
|
366
362
|
Fires when a member joins a guild.
|
367
363
|
|
@@ -369,7 +365,7 @@ Fires when a member joins a guild.
|
|
369
365
|
| ---------- | ----- | ----------- |
|
370
366
|
|`member` | {Discorb::Member}| The member that joined. |
|
371
367
|
|
372
|
-
#### `member_update(
|
368
|
+
#### `member_update(before, after)`
|
373
369
|
|
374
370
|
Fires when a member is updated.
|
375
371
|
|
@@ -378,7 +374,7 @@ Fires when a member is updated.
|
|
378
374
|
|`before` | {Discorb::Member}| The member before the update. |
|
379
375
|
|`after` | {Discorb::Member}| The member after the update. |
|
380
376
|
|
381
|
-
#### `member_remove(
|
377
|
+
#### `member_remove(member)`
|
382
378
|
|
383
379
|
Fires when a member is removed from a guild.
|
384
380
|
|
@@ -388,7 +384,7 @@ Fires when a member is removed from a guild.
|
|
388
384
|
|
389
385
|
### Role events
|
390
386
|
|
391
|
-
#### `role_create(
|
387
|
+
#### `role_create(role)`
|
392
388
|
|
393
389
|
Fires when a role is created.
|
394
390
|
|
@@ -396,7 +392,7 @@ Fires when a role is created.
|
|
396
392
|
| ---------- | ----- | ----------- |
|
397
393
|
|`role` | {Discorb::Role}| The created role. |
|
398
394
|
|
399
|
-
#### `role_update(
|
395
|
+
#### `role_update(before, after)`
|
400
396
|
|
401
397
|
Fires when a role is updated.
|
402
398
|
|
@@ -405,7 +401,7 @@ Fires when a role is updated.
|
|
405
401
|
|`before` | {Discorb::Role}| The role before the update. |
|
406
402
|
|`after` | {Discorb::Role}| The role after the update. |
|
407
403
|
|
408
|
-
#### `role_remove(
|
404
|
+
#### `role_remove(role)`
|
409
405
|
|
410
406
|
Fires when a role is deleted.
|
411
407
|
|
@@ -415,7 +411,7 @@ Fires when a role is deleted.
|
|
415
411
|
|
416
412
|
### Invite events
|
417
413
|
|
418
|
-
#### `invite_create(
|
414
|
+
#### `invite_create(invite)`
|
419
415
|
|
420
416
|
Fires when a invite is created.
|
421
417
|
|
@@ -423,7 +419,7 @@ Fires when a invite is created.
|
|
423
419
|
| ---------- | ----- | ----------- |
|
424
420
|
|`invite` | {Discorb::Invite}| The created invite. |
|
425
421
|
|
426
|
-
#### `invite_delete(
|
422
|
+
#### `invite_delete(invite)`
|
427
423
|
|
428
424
|
Fires when a invite is deleted.
|
429
425
|
|
@@ -433,7 +429,7 @@ Fires when a invite is deleted.
|
|
433
429
|
|
434
430
|
### Interaction events
|
435
431
|
|
436
|
-
#### `button_click(
|
432
|
+
#### `button_click(interaction)`
|
437
433
|
|
438
434
|
Fires when a button is clicked.
|
439
435
|
|
@@ -441,7 +437,7 @@ Fires when a button is clicked.
|
|
441
437
|
| ---------- | ----- | ----------- |
|
442
438
|
|`interaction`| {Discorb::MessageComponentInteraction::Button}| The interaction object. |
|
443
439
|
|
444
|
-
#### `select_menu_select(
|
440
|
+
#### `select_menu_select(interaction)`
|
445
441
|
|
446
442
|
Fires when a select menu is selected.
|
447
443
|
|
@@ -455,7 +451,7 @@ It's too big, so they're documented in {file:docs/voice_events.md}
|
|
455
451
|
|
456
452
|
### Low-level events
|
457
453
|
|
458
|
-
#### `guild_create(
|
454
|
+
#### `guild_create(guild)`
|
459
455
|
|
460
456
|
Fires when `GUILD_CREATE` is received.
|
461
457
|
|
@@ -463,7 +459,7 @@ Fires when `GUILD_CREATE` is received.
|
|
463
459
|
| ---------- | ----- | ----------- |
|
464
460
|
|`guild` | {Discorb::Guild}| The guild of the event. |
|
465
461
|
|
466
|
-
#### `guild_delete(
|
462
|
+
#### `guild_delete(guild)`
|
467
463
|
|
468
464
|
Fires when `GUILD_DELETE` is received.
|
469
465
|
|
@@ -471,7 +467,7 @@ Fires when `GUILD_DELETE` is received.
|
|
471
467
|
| ---------- | ----- | ----------- |
|
472
468
|
|`guild` | {Discorb::Guild}| The guild of the event. |
|
473
469
|
|
474
|
-
#### `thread_create(
|
470
|
+
#### `thread_create(thread)`
|
475
471
|
|
476
472
|
Fires when `THREAD_CREATE` is received.
|
477
473
|
|