discorb 0.9.4 → 0.10.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 575a8b441c3065b5ffa3620b115c58f6356da23c0a50448e48e8db2c364093ef
4
- data.tar.gz: c355067b4585325ecc33e400e5a96ba5b95f71843882217f1bc6d34de502b931
3
+ metadata.gz: 711fc9fac1407a6de44da571555d6b5eb0575983453a8371bbb1df960ae376ac
4
+ data.tar.gz: 33defa63e7f65c82eee318a4d3783c2640fc1dcb54ffdf4941694cef7e72b1a9
5
5
  SHA512:
6
- metadata.gz: c93f55029eeaaa52448146e1f19f4fd482ae50038b3024c7339a32ad6afc350604e860ae11d8ca36a69b13fc565ce7c64aa445fe17aca2423c6aad9792e2e78f
7
- data.tar.gz: 57e2b64e98d0fbff3cb69c8ad576267adc9d17dbe066b1005db2c5a394d7a61faf003e8957b858fc18804b76195a1d16cd0d00ce1e49a9b8ff11225c5289dc5a
6
+ metadata.gz: 6a58931cea651763d030c14a61f1f463b7959449bcd70599819c0140884a2a0d86cde1706f97fb3af81013eb6fe2d5372df743a5275dc86f454d01618ba1a90a
7
+ data.tar.gz: 884bdcfa59ff7612bcf9f0f12186c5e4cf51313b22a71dac308edc2abaaf45f33cf5e6f85c48681beb976309a245610d16dfd5c781bc6e50c90c0f9e215bc11a
data/Changelog.md CHANGED
@@ -1,254 +1,304 @@
1
- # Changelog
2
-
3
- ## v0.0.1
4
-
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
18
- - Add: Add `#author` to webhook message
19
- - Fix: Add `#bot?` to webhook author
20
-
21
- ## v0.0.5
22
-
23
- - Fix: Fix GitHub link
24
- - Change: Internet to HTTP
25
-
26
- ## v0.0.6
27
-
28
- - Fix: Fix error in client without members intent
29
- - Add: Add ThreadChannel::News
30
- - Add: Add official discord link
31
-
32
- ## v0.0.7
33
-
34
- - Fix: Fix `member_xxx` event
35
-
36
- ## 0.0.8
37
-
38
- - Delete: Delete task parameter
39
-
40
- ## 0.1.0
41
-
42
- - Add: Add `User#created_at`
43
- - Add: Add `Member#to_s_user`
44
- - Add: Add `DefaultAvatar`
45
- - Add: Support application commands
46
- - Add: Add `Client#ping`
47
- - Add: Allow `String` for `Embed#initialize`
48
- - Change: Change log format
49
-
50
- ## 0.2.0
51
-
52
- - Fix: Fix unused dependency
53
- - Add: Add `Client#close!`
54
- - Add: Add discord-irb
55
-
56
- ## 0.2.1
57
-
58
- - Fix: Fix NoMethodError in reaction event
59
- - Add: Add Changelog.md to document
60
-
61
- ## 0.2.2 (yanked)
62
-
63
- - Add: Add `Snowflake#to_str`
64
-
65
- ## 0.2.3
66
-
67
- - Fix: Fix critical error
68
-
69
- ## 0.2.4
70
-
71
- - Fix: Fix error in `Embed#image=`, `Embed#thumbnail=`
72
-
73
- ## 0.2.5
74
-
75
- - Add: Add way to add event listener
76
- - Change: Move document to https://discorb-lib.github.io/
77
-
78
- ## 0.3.0
79
-
80
- - Add: Improve CLI tools
81
- - Add: Add `discorb init`
82
- - Change: Change `discord-irb` to `discorb irb`
83
-
84
- ## 0.3.1
85
-
86
- - Add: Add `discorb show`
87
- - Fix: Fix documenting
88
-
89
- ## 0.4.0
90
-
91
- - Add: Add `discorb setup`
92
- - Add: Add `discorb run`
93
- - Add: Add realtime documentation
94
-
95
- ## 0.4.1
96
-
97
- - Add: Add `-s` option to `discorb run`
98
-
99
- ## 0.4.2
100
-
101
- - Fix: Fix error in `discorb run`
102
-
103
- ## 0.5.0
104
-
105
- - Change: Use zlib stream instead
106
- - Add: Add tutorials
107
- - Add: Add ratelimit handler
108
- - Change: Make `--git` option in `discorb init` false
109
-
110
- ## 0.5.1
111
-
112
- - Add: Can use block for defining group commands
113
- - Fix: Fix bug in subcommands
114
- - Fix: Fix bug in receiving commands
115
-
116
- ## 0.5.2
117
-
118
- - Fix: Fix bug of registering commands
119
- - Add: Add way to register commands in Extension
120
-
121
- ## 0.5.3
122
-
123
- - Add: Add way to handle raw events with `event_xxx`
124
- - Add: Add `Client#session_id`
125
- - Add: Add `Connectable`
126
- - Fix: Fix error by sending DM
127
-
128
- ## 0.5.4
129
-
130
- - Fix: Fix issue of receiving component events
131
-
132
- ## 0.5.5
133
-
134
- - Fix: Fix some bugs
135
-
136
- ## 0.5.6
137
-
138
- - Add: Raise error when intents are invalid
139
- - Fix: Fix Emoji#==
140
-
141
- ## 0.6.0
142
-
143
- - Fix: Fix issue with client with no guilds
144
- - Add: Add rbs (experimental)
145
- - Add: Add `-t`, `--token` option to `discorb run`
146
- - Add: Add `-g`, `--guild` option to `discorb setup`
147
- - Change: Use `Async::Task<R>` instead of `R` in return value
148
-
149
- ## 0.6.1
150
-
151
- - Change: Rename `Event#discriminator` to `Event#metadata`
152
- - Add: Add `:override` to `Client#on`
153
-
154
- ## 0.7.0
155
-
156
- - Add: Add `error` event
157
- - Fix: Fix some issues with client without guild intent
158
- - Add: Add alias for `#fired_by`
159
- - Change!: Change block usage of `ApplicationCommand::Handler#group`
160
-
161
- ```ruby
162
- # before
163
- client.slash_group do
164
- slash "help", "Help" do |interaction|
165
- # ...
166
- end
167
- end
168
-
169
- # after
170
- client.slash_group do |group|
171
- group.slash "help", "Help" do |interaction|
172
- # ...
173
- end
174
- end
175
-
176
- ```
177
-
178
- ## 0.7.1
179
-
180
- - Fix: Fix error of responding to interaction
181
-
182
- ## 0.7.2
183
-
184
- - Add: Add `Member#owner?`
185
- - Fix: Fix `Member#permissions`
186
- - Add: Add `Member#guild_permissions` as alias of `Member#permissions`
187
- - Add: Add default role to `Member#roles`
188
- - Fix: Fix error in `Integration#_set_data`
189
- - Change: Reverse `Member#roles`
190
-
191
- ## 0.7.3
192
-
193
- - Add: Improve `discorb init`
194
-
195
- ## 0.7.4 (yanked)
196
-
197
- - Fix: Fix disconnected client
198
-
199
- ## 0.7.5 (yanked)
200
-
201
- - Fix: Fix critical error
202
-
203
- ## 0.7.6
204
-
205
- - Fix: Fix heartbeating error
206
-
207
- ## 0.8.0
208
-
209
- - Add: Add `Guild#fetch_members`
210
- - Add: Add `Guild#fetch_member_list` as alias of `Guild#fetch_members`
211
- - Add: Add `Intents#to_h`
212
- - Add: Add `fetch_member` parameter to `Client#initialize`; Note you should set `false` if your bot doesn't have `GUILD_MEMBERS` intent
213
- - Change: Change `ready` to `standby` event
214
- - Change: `ready` will be fired when client receives `READY` event
215
-
216
- ## 0.8.1
217
-
218
- - Add: Add FAQ
219
- - Fix: Fix sending files
220
- - Add: Add `File.from_string`
221
- - Fix: Fix `Client#update_presence`
222
- - Add: Add information in `discorb run -d`
223
-
224
- ## 0.8.2
225
-
226
- - Fix: Fix `Client#initialize`
227
-
228
- ## 0.9.0
229
-
230
- - Delete: Delete `-d` parameter from `discorb run`; This is caused by segement fault error.
231
- - Change: Rename `-t`, `--token` to `-e`, `--env` parameter
232
- - Add: Add `-t`, `--title` parameter to `discorb run`
233
- - Add: Add `title` parameter to `Client#initialize`
234
-
235
- ## 0.9.1
236
-
237
- - Fix: Fix member fetching
238
-
239
- ## 0.9.2 (yanked)
240
-
241
- - Add: Make `Async::Task#inspect` shorter
242
- - Add: `SourceResponse#post` will return message now
243
- - Fix: Fix member caching
244
-
245
- ## 0.9.3
246
-
247
- - Fix: Fix interaction responding
248
-
249
- ## 0.9.4
250
-
251
- - Change: `Messageable#typing` with block is now synchronous
252
- - Fix: Fix some issues in document
253
- - Add: Add some attributes to `Message`
254
- - Fix: Fix guild parameter in message of message command
1
+ # @title Changelog
2
+
3
+ # Changelog
4
+
5
+ ## v0.10
6
+
7
+ ### v0.10.1
8
+
9
+ - Add: Add `Client#extensions`
10
+ - Change: `Client#load_extension` allows instance of `Extension`
11
+ - Add: Add `-b` option to `discorb run`
12
+
13
+ ### v0.10.0
14
+
15
+ - Change: Sort versions
16
+ - Change: Snowflake is now String
17
+ - Change: Extension is now Class
18
+ - Add: Add `SelectMenu#disabled=`
19
+
20
+ ## v0.9
21
+
22
+ ### v0.9.6
23
+
24
+ - Add: Add `Messageable#send_message` as alias of `Messageable#post`
25
+ - Fix: Fix interaction responding with updating message
26
+ - Fix: Fix `MessageComponentInteraction#message`
27
+
28
+ ### v0.9.5
29
+
30
+ - Fix: Fix editing message
31
+ - Add: Add `required` in slash command argument
32
+ - Add: Add `default` in slash command argument
33
+
34
+ ### v0.9.4
35
+
36
+ - Change: `Messageable#typing` with block is now synchronous
37
+ - Fix: Fix some issues in document
38
+ - Add: Add some attributes to `Message`
39
+ - Fix: Fix guild parameter in message of message command
40
+
41
+ ### v0.9.3
42
+
43
+ - Fix: Fix interaction responding
44
+
45
+ ### v0.9.2 (yanked)
46
+
47
+ - Add: Make `Async::Task#inspect` shorter
48
+ - Add: `SourceResponse#post` will return message now
49
+ - Fix: Fix member caching
50
+
51
+ ### v0.9.1
52
+
53
+ - Fix: Fix member fetching
54
+
55
+ ### v0.9.0
56
+
57
+ - Delete: Delete `-d` parameter from `discorb run`; This is caused by segement fault error.
58
+ - Change: Rename `-t`, `--token` to `-e`, `--env` parameter
59
+ - Add: Add `-t`, `--title` parameter to `discorb run`
60
+ - Add: Add `title` parameter to `Client#initialize`
61
+
62
+ ## v0.8
63
+
64
+ ### v0.8.2
65
+
66
+ - Fix: Fix `Client#initialize`
67
+
68
+ ### v0.8.1
69
+
70
+ - Add: Add FAQ
71
+ - Fix: Fix sending files
72
+ - Add: Add `File.from_string`
73
+ - Fix: Fix `Client#update_presence`
74
+ - Add: Add information in `discorb run -d`
75
+
76
+ ### v0.8.0
77
+
78
+ - Add: Add `Guild#fetch_members`
79
+ - Add: Add `Guild#fetch_member_list` as alias of `Guild#fetch_members`
80
+ - Add: Add `Intents#to_h`
81
+ - Add: Add `fetch_member` parameter to `Client#initialize`; Note you should set `false` if your bot doesn't have `GUILD_MEMBERS` intent
82
+ - Change: Change `ready` to `standby` event
83
+ - Change: `ready` will be fired when client receives `READY` event
84
+
85
+ ## v0.7
86
+
87
+ ### v0.7.6
88
+
89
+ - Fix: Fix heartbeating error
90
+
91
+ ### v0.7.5 (yanked)
92
+
93
+ - Fix: Fix critical error
94
+
95
+ ### v0.7.4 (yanked)
96
+
97
+ - Fix: Fix disconnected client
98
+
99
+ ### v0.7.3
100
+
101
+ - Add: Improve `discorb init`
102
+
103
+ ### v0.7.2
104
+
105
+ - Add: Add `Member#owner?`
106
+ - Fix: Fix `Member#permissions`
107
+ - Add: Add `Member#guild_permissions` as alias of `Member#permissions`
108
+ - Add: Add default role to `Member#roles`
109
+ - Fix: Fix error in `Integration#_set_data`
110
+ - Change: Reverse `Member#roles`
111
+
112
+ ### v0.7.1
113
+
114
+ - Fix: Fix error of responding to interaction
115
+
116
+ ### v0.7.0
117
+
118
+ - Add: Add `error` event
119
+ - Fix: Fix some issues with client without guild intent
120
+ - Add: Add alias for `#fired_by`
121
+ - Change!: Change block usage of `ApplicationCommand::Handler#group`
122
+
123
+ ```ruby
124
+ # before
125
+ client.slash_group do
126
+ slash "help", "Help" do |interaction|
127
+ # ...
128
+ end
129
+ end
130
+
131
+ # after
132
+ client.slash_group do |group|
133
+ group.slash "help", "Help" do |interaction|
134
+ # ...
135
+ end
136
+ end
137
+
138
+ ```
139
+
140
+ ## v0.6
141
+
142
+ ### v0.6.1
143
+
144
+ - Change: Rename `Event#discriminator` to `Event#metadata`
145
+ - Add: Add `:override` to `Client#on`
146
+
147
+ ### v0.6.0
148
+
149
+ - Fix: Fix issue with client with no guilds
150
+ - Add: Add rbs (experimental)
151
+ - Add: Add `-t`, `--token` option to `discorb run`
152
+ - Add: Add `-g`, `--guild` option to `discorb setup`
153
+ - Change: Use `Async::Task<R>` instead of `R` in return value
154
+
155
+ ## v0.5
156
+
157
+ ### v0.5.6
158
+
159
+ - Add: Raise error when intents are invalid
160
+ - Fix: Fix Emoji#==
161
+
162
+ ### v0.5.5
163
+
164
+ - Fix: Fix some bugs
165
+
166
+ ### v0.5.4
167
+
168
+ - Fix: Fix issue of receiving component events
169
+
170
+ ### v0.5.3
171
+
172
+ - Add: Add way to handle raw events with `event_xxx`
173
+ - Add: Add `Client#session_id`
174
+ - Add: Add `Connectable`
175
+ - Fix: Fix error by sending DM
176
+
177
+ ### v0.5.2
178
+
179
+ - Fix: Fix bug of registering commands
180
+ - Add: Add way to register commands in Extension
181
+
182
+ ### v0.5.1
183
+
184
+ - Add: Can use block for defining group commands
185
+ - Fix: Fix bug in subcommands
186
+ - Fix: Fix bug in receiving commands
187
+
188
+ ### v0.5.0
189
+
190
+ - Change: Use zlib stream instead
191
+ - Add: Add tutorials
192
+ - Add: Add ratelimit handler
193
+ - Change: Make `--git` option in `discorb init` false
194
+
195
+ ## v0.4
196
+
197
+ ### v0.4.2
198
+
199
+ - Fix: Fix error in `discorb run`
200
+
201
+ ### v0.4.1
202
+
203
+ - Add: Add `-s` option to `discorb run`
204
+
205
+ ### v0.4.0
206
+
207
+ - Add: Add `discorb setup`
208
+ - Add: Add `discorb run`
209
+ - Add: Add realtime documentation
210
+
211
+ ## v0.3
212
+
213
+ ### v0.3.1
214
+
215
+ - Add: Add `discorb show`
216
+ - Fix: Fix documenting
217
+
218
+ ### v0.3.0
219
+
220
+ - Add: Improve CLI tools
221
+ - Add: Add `discorb init`
222
+ - Change: Change `discord-irb` to `discorb irb`
223
+
224
+ ## v0.2
225
+
226
+ ### v0.2.5
227
+
228
+ - Add: Add way to add event listener
229
+ - Change: Move document to https://discorb-lib.github.io/
230
+
231
+ ### v0.2.4
232
+
233
+ - Fix: Fix error in `Embed#image=`, `Embed#thumbnail=`
234
+
235
+ ### v0.2.3
236
+
237
+ - Fix: Fix critical error
238
+
239
+ ### v0.2.2 (yanked)
240
+
241
+ - Add: Add `Snowflake#to_str`
242
+
243
+ ### v0.2.1
244
+
245
+ - Fix: Fix NoMethodError in reaction event
246
+ - Add: Add Changelog.md to document
247
+
248
+ ### v0.2.0
249
+
250
+ - Fix: Fix unused dependency
251
+ - Add: Add `Client#close!`
252
+ - Add: Add discord-irb
253
+
254
+ ## v0.1
255
+
256
+ ### v0.1.0
257
+
258
+ - Add: Add `User#created_at`
259
+ - Add: Add `Member#to_s_user`
260
+ - Add: Add `DefaultAvatar`
261
+ - Add: Support application commands
262
+ - Add: Add `Client#ping`
263
+ - Add: Allow `String` for `Embed#initialize`
264
+ - Change: Change log format
265
+
266
+ ## v0.0
267
+
268
+ ### v0.0.8
269
+
270
+ - Delete: Delete task parameter
271
+
272
+ ### v0.0.7
273
+
274
+ - Fix: Fix `member_xxx` event
275
+
276
+ ### v0.0.6
277
+
278
+ - Fix: Fix error in client without members intent
279
+ - Add: Add ThreadChannel::News
280
+ - Add: Add official discord link
281
+
282
+ ### v0.0.5
283
+
284
+ - Fix: Fix GitHub link
285
+ - Change: Internet to HTTP
286
+
287
+ ### v0.0.4
288
+
289
+ - Fix: Fix NoMethodError by webhook message
290
+ - Add: Add `#author` to webhook message
291
+ - Fix: Add `#bot?` to webhook author
292
+
293
+ ### v0.0.3
294
+
295
+ - Fix: Fix no dependencies
296
+
297
+ ### v0.0.2
298
+
299
+ - Fix: Fix rubygems description
300
+
301
+ ### v0.0.1
302
+
303
+ - Initial release
304
+
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <div align="center"><img src="./assets/banner.svg" alt="discorb"></div>
2
2
 
3
- <div align="center"><a href="https://discorb-lib.github.io/"><img src="https://img.shields.io/badge/Document-discorb--lib.github.io-blue.svg?style=flat-square" alt="Document"></a>
4
- <a href="https://rubygems.org/gems/discorb"><img src="https://img.shields.io/gem/dt/discorb?logo=rubygems&logoColor=fff&label=Downloads&style=flat-square" alt="Gem"></a>
5
- <a href="https://rubygems.org/gems/discorb"><img src="https://img.shields.io/gem/v/discorb?logo=rubygems&logoColor=fff&label=Version&style=flat-square" alt="Gem"></a>
6
- <a href="https://discord.gg/hCP6zq8Vpj"><img src="https://img.shields.io/discord/863581274916913193?logo=discord&logoColor=fff&color=5865f2&label=Discord&style=flat-square" alt="Discord"></a>
7
- <a href="https://github.com/discorb-lib/discorb"><img src="https://img.shields.io/github/stars/discorb-lib/discorb?color=24292e&label=Stars&logo=GitHub&logoColor=fff&style=flat-square" alt="GitHub"></a></div>
3
+ <div align="center"><a href="https://discorb-lib.github.io/"><img src="https://img.shields.io/badge/Document-discorb--lib.github.io-blue.svg?style=flat-square&labelColor=2f3136" alt="Document"></a>
4
+ <a href="https://rubygems.org/gems/discorb"><img src="https://img.shields.io/gem/dt/discorb?logo=rubygems&logoColor=fff&label=Downloads&style=flat-square&labelColor=2f3136" alt="Gem"></a>
5
+ <a href="https://rubygems.org/gems/discorb"><img src="https://img.shields.io/gem/v/discorb?logo=rubygems&logoColor=fff&label=Version&style=flat-square&labelColor=2f3136" alt="Gem"></a>
6
+ <a href="https://discord.gg/hCP6zq8Vpj"><img src="https://img.shields.io/discord/863581274916913193?logo=discord&logoColor=fff&color=5865f2&label=Discord&style=flat-square&labelColor=2f3136" alt="Discord"></a>
7
+ <a href="https://github.com/discorb-lib/discorb"><img src="https://img.shields.io/github/stars/discorb-lib/discorb?color=24292e&label=Stars&logo=GitHub&logoColor=fff&style=flat-square&labelColor=2f3136" alt="GitHub"></a></div>
8
8
 
9
9
  ----
10
10
 
data/Rakefile CHANGED
@@ -91,6 +91,7 @@ namespace :document do
91
91
  require_relative "template-replace/scripts/index.rb"
92
92
  require_relative "template-replace/scripts/yard_replace.rb"
93
93
  require_relative "template-replace/scripts/favicon.rb"
94
+ require_relative "template-replace/scripts/arrow.rb"
94
95
  iputs "Resetting changes"
95
96
  Dir.glob("doc/#{version}/**/*.html") do |f|
96
97
  next if (m = f.match(/[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+)?/)) && m[0] != version
@@ -112,6 +113,8 @@ namespace :document do
112
113
  yard_replace("doc/#{version}", version)
113
114
  iputs "Adding favicon"
114
115
  add_favicon("doc/#{version}")
116
+ iputs "Replacing arrow"
117
+ replace_arrow("doc/#{version}")
115
118
  iputs "Successfully replaced htmls"
116
119
  end
117
120
 
@@ -60,13 +60,14 @@ In `options`, hash should be like this:
60
60
  }
61
61
  }
62
62
  ```
63
-
64
- | Key | Description |
65
- | --- | --- |
66
- | `type` | The type of the argument. |
67
- | `required` | Whether the argument is required. |
68
- | `description` | The description of the argument. |
69
- | `choices` | The choices of the argument. |
63
+ | Key | Type | Description |
64
+ | --- | --- | --- |
65
+ | `:description` | `String` | Description of the option. |
66
+ | `:required` | Whether the argument is required. `optional` will be used if not specified. |
67
+ | `:optional` | Whether the argument is optional. `required` will be used if not specified. |
68
+ | `:type` | `Object` | Type of the option. |
69
+ | `:choice` | `Hash{String => String, Integer, Float}` | Type of the option. |
70
+ | `:default` | `Object` | Default value of the option. |
70
71
 
71
72
  `choices` should be unspecified if you don't want to use it.
72
73
  `choices` is hash like this:
data/docs/cli/run.md CHANGED
@@ -53,4 +53,8 @@ Whether to setup application commands.
53
53
 
54
54
  #### `-e`, `--env`
55
55
 
56
- The name of the environment variable to use for token, or just `-t` or `--token` for intractive prompt.
56
+ The name of the environment variable to use for token, or just `-t` or `--token` for intractive prompt.
57
+
58
+ #### `-b`, `--bundler`
59
+
60
+ Whether to use bundler to load the script.