discorb 0.9.3 → 0.10.0

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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build_main.yml +2 -0
  3. data/Changelog.md +298 -247
  4. data/README.md +6 -6
  5. data/Rakefile +7 -1
  6. data/assets/banner.svg +101 -101
  7. data/docs/application_command.md +8 -7
  8. data/docs/cli/run.md +3 -3
  9. data/docs/extension.md +16 -22
  10. data/docs/license.md +5 -1
  11. data/examples/extension/main.rb +1 -1
  12. data/examples/extension/message_expander.rb +4 -6
  13. data/lib/discorb/app_command.rb +12 -10
  14. data/lib/discorb/application.rb +3 -3
  15. data/lib/discorb/asset.rb +2 -2
  16. data/lib/discorb/audit_logs.rb +7 -7
  17. data/lib/discorb/channel.rb +10 -10
  18. data/lib/discorb/client.rb +22 -23
  19. data/lib/discorb/common.rb +6 -25
  20. data/lib/discorb/components.rb +31 -3
  21. data/lib/discorb/embed.rb +2 -2
  22. data/lib/discorb/emoji.rb +3 -3
  23. data/lib/discorb/error.rb +2 -2
  24. data/lib/discorb/exe/init.rb +8 -8
  25. data/lib/discorb/exe/run.rb +1 -1
  26. data/lib/discorb/extend.rb +21 -0
  27. data/lib/discorb/extension.rb +60 -47
  28. data/lib/discorb/file.rb +19 -1
  29. data/lib/discorb/gateway.rb +8 -8
  30. data/lib/discorb/gateway_requests.rb +1 -1
  31. data/lib/discorb/guild.rb +7 -7
  32. data/lib/discorb/guild_template.rb +4 -4
  33. data/lib/discorb/http.rb +1 -1
  34. data/lib/discorb/integration.rb +3 -3
  35. data/lib/discorb/interaction.rb +36 -32
  36. data/lib/discorb/invite.rb +2 -2
  37. data/lib/discorb/log.rb +1 -1
  38. data/lib/discorb/member.rb +1 -1
  39. data/lib/discorb/message.rb +34 -10
  40. data/lib/discorb/modules.rb +15 -49
  41. data/lib/discorb/permission.rb +2 -2
  42. data/lib/discorb/presence.rb +8 -8
  43. data/lib/discorb/rate_limit.rb +1 -1
  44. data/lib/discorb/reaction.rb +1 -1
  45. data/lib/discorb/role.rb +2 -2
  46. data/lib/discorb/sticker.rb +3 -3
  47. data/lib/discorb/user.rb +2 -2
  48. data/lib/discorb/utils/colored_puts.rb +3 -3
  49. data/lib/discorb/utils.rb +1 -21
  50. data/lib/discorb/voice_state.rb +3 -3
  51. data/lib/discorb/webhook.rb +7 -8
  52. data/lib/discorb.rb +1 -1
  53. data/sig/discorb.rbs +2 -2
  54. data/template-replace/files/css/common.css +26 -0
  55. data/template-replace/files/favicon.png +0 -0
  56. data/template-replace/scripts/arrow.rb +7 -0
  57. data/template-replace/scripts/favicon.rb +9 -0
  58. data/template-replace/scripts/version.rb +20 -5
  59. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbb61003015daf1f1731f80809e9c739cad169f60b7b5f7cc6c1ac7580d61bd1
4
- data.tar.gz: e2d7bcad6c493bea84b7f2608a1d1366f76e95675c50052b034742be322d0569
3
+ metadata.gz: d1b87a672806fd34b5a1a3308bd96db493c13a645a2f4ae7cd6a3b9622cf7a01
4
+ data.tar.gz: fc1b8e0b433489e1390b958b7b4ebeb9c39c1f2d38ff80c05334dda5f19f3bd8
5
5
  SHA512:
6
- metadata.gz: 9b2cee7155fe0273181fc7cf1fdd048ebd0b9d1adba4ca7c4444a31a92b5cd86a65c77511e581858c379e1abb53d1d092ab6115394b0a9fbc076b6692b04312b
7
- data.tar.gz: 245db18f6b68599ccf199e5c1571a3f38181d4a4a6dc5371cf55e29bc9dd1d95766ff67047091558aaf392f41ea3fb0d28b726972c120ad7dd80a216a1e3699c
6
+ metadata.gz: 4c666466d4c10d93e974ecd843d14d9e92b424c18e6fab784dba54ff8c0caf9c5f54feaaa7c03e32f640a237af4ee6795e653691035c3e80e3c7a4af79740143
7
+ data.tar.gz: 344ecd871e7c1e98a1ad2b68f75f988ee2aabfbe78e24ecf4e8a58da069e04b8e3327f5348414c33a619381c520ea7dbb4fb173cbea6fa153cb2dd5b07b9f9e2
@@ -12,6 +12,8 @@ jobs:
12
12
 
13
13
  steps:
14
14
  - uses: actions/checkout@v2
15
+ with:
16
+ fetch-depth: 0
15
17
  - name: Set up Ruby
16
18
  uses: ruby/setup-ruby@v1
17
19
  with:
data/Changelog.md CHANGED
@@ -1,247 +1,298 @@
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
1
+ # @title Changelog
2
+
3
+ # Changelog
4
+
5
+ ## v0.10
6
+
7
+ ### v0.10.0
8
+
9
+ - Change: Sort versions
10
+ - Change: Snowflake is now String
11
+ - Change: Extension is now Class
12
+ - Add: Add `SelectMenu#disabled=`
13
+
14
+ ## v0.9
15
+
16
+ ### v0.9.6
17
+
18
+ - Add: Add `Messageable#send_message` as alias of `Messageable#post`
19
+ - Fix: Fix interaction responding with updating message
20
+ - Fix: Fix `MessageComponentInteraction#message`
21
+
22
+ ### v0.9.5
23
+
24
+ - Fix: Fix editing message
25
+ - Add: Add `required` in slash command argument
26
+ - Add: Add `default` in slash command argument
27
+
28
+ ### v0.9.4
29
+
30
+ - Change: `Messageable#typing` with block is now synchronous
31
+ - Fix: Fix some issues in document
32
+ - Add: Add some attributes to `Message`
33
+ - Fix: Fix guild parameter in message of message command
34
+
35
+ ### v0.9.3
36
+
37
+ - Fix: Fix interaction responding
38
+
39
+ ### v0.9.2 (yanked)
40
+
41
+ - Add: Make `Async::Task#inspect` shorter
42
+ - Add: `SourceResponse#post` will return message now
43
+ - Fix: Fix member caching
44
+
45
+ ### v0.9.1
46
+
47
+ - Fix: Fix member fetching
48
+
49
+ ### v0.9.0
50
+
51
+ - Delete: Delete `-d` parameter from `discorb run`; This is caused by segement fault error.
52
+ - Change: Rename `-t`, `--token` to `-e`, `--env` parameter
53
+ - Add: Add `-t`, `--title` parameter to `discorb run`
54
+ - Add: Add `title` parameter to `Client#initialize`
55
+
56
+ ## v0.8
57
+
58
+ ### v0.8.2
59
+
60
+ - Fix: Fix `Client#initialize`
61
+
62
+ ### v0.8.1
63
+
64
+ - Add: Add FAQ
65
+ - Fix: Fix sending files
66
+ - Add: Add `File.from_string`
67
+ - Fix: Fix `Client#update_presence`
68
+ - Add: Add information in `discorb run -d`
69
+
70
+ ### v0.8.0
71
+
72
+ - Add: Add `Guild#fetch_members`
73
+ - Add: Add `Guild#fetch_member_list` as alias of `Guild#fetch_members`
74
+ - Add: Add `Intents#to_h`
75
+ - Add: Add `fetch_member` parameter to `Client#initialize`; Note you should set `false` if your bot doesn't have `GUILD_MEMBERS` intent
76
+ - Change: Change `ready` to `standby` event
77
+ - Change: `ready` will be fired when client receives `READY` event
78
+
79
+ ## v0.7
80
+
81
+ ### v0.7.6
82
+
83
+ - Fix: Fix heartbeating error
84
+
85
+ ### v0.7.5 (yanked)
86
+
87
+ - Fix: Fix critical error
88
+
89
+ ### v0.7.4 (yanked)
90
+
91
+ - Fix: Fix disconnected client
92
+
93
+ ### v0.7.3
94
+
95
+ - Add: Improve `discorb init`
96
+
97
+ ### v0.7.2
98
+
99
+ - Add: Add `Member#owner?`
100
+ - Fix: Fix `Member#permissions`
101
+ - Add: Add `Member#guild_permissions` as alias of `Member#permissions`
102
+ - Add: Add default role to `Member#roles`
103
+ - Fix: Fix error in `Integration#_set_data`
104
+ - Change: Reverse `Member#roles`
105
+
106
+ ### v0.7.1
107
+
108
+ - Fix: Fix error of responding to interaction
109
+
110
+ ### v0.7.0
111
+
112
+ - Add: Add `error` event
113
+ - Fix: Fix some issues with client without guild intent
114
+ - Add: Add alias for `#fired_by`
115
+ - Change!: Change block usage of `ApplicationCommand::Handler#group`
116
+
117
+ ```ruby
118
+ # before
119
+ client.slash_group do
120
+ slash "help", "Help" do |interaction|
121
+ # ...
122
+ end
123
+ end
124
+
125
+ # after
126
+ client.slash_group do |group|
127
+ group.slash "help", "Help" do |interaction|
128
+ # ...
129
+ end
130
+ end
131
+
132
+ ```
133
+
134
+ ## v0.6
135
+
136
+ ### v0.6.1
137
+
138
+ - Change: Rename `Event#discriminator` to `Event#metadata`
139
+ - Add: Add `:override` to `Client#on`
140
+
141
+ ### v0.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
+ ## v0.5
150
+
151
+ ### v0.5.6
152
+
153
+ - Add: Raise error when intents are invalid
154
+ - Fix: Fix Emoji#==
155
+
156
+ ### v0.5.5
157
+
158
+ - Fix: Fix some bugs
159
+
160
+ ### v0.5.4
161
+
162
+ - Fix: Fix issue of receiving component events
163
+
164
+ ### v0.5.3
165
+
166
+ - Add: Add way to handle raw events with `event_xxx`
167
+ - Add: Add `Client#session_id`
168
+ - Add: Add `Connectable`
169
+ - Fix: Fix error by sending DM
170
+
171
+ ### v0.5.2
172
+
173
+ - Fix: Fix bug of registering commands
174
+ - Add: Add way to register commands in Extension
175
+
176
+ ### v0.5.1
177
+
178
+ - Add: Can use block for defining group commands
179
+ - Fix: Fix bug in subcommands
180
+ - Fix: Fix bug in receiving commands
181
+
182
+ ### v0.5.0
183
+
184
+ - Change: Use zlib stream instead
185
+ - Add: Add tutorials
186
+ - Add: Add ratelimit handler
187
+ - Change: Make `--git` option in `discorb init` false
188
+
189
+ ## v0.4
190
+
191
+ ### v0.4.2
192
+
193
+ - Fix: Fix error in `discorb run`
194
+
195
+ ### v0.4.1
196
+
197
+ - Add: Add `-s` option to `discorb run`
198
+
199
+ ### v0.4.0
200
+
201
+ - Add: Add `discorb setup`
202
+ - Add: Add `discorb run`
203
+ - Add: Add realtime documentation
204
+
205
+ ## v0.3
206
+
207
+ ### v0.3.1
208
+
209
+ - Add: Add `discorb show`
210
+ - Fix: Fix documenting
211
+
212
+ ### v0.3.0
213
+
214
+ - Add: Improve CLI tools
215
+ - Add: Add `discorb init`
216
+ - Change: Change `discord-irb` to `discorb irb`
217
+
218
+ ## v0.2
219
+
220
+ ### v0.2.5
221
+
222
+ - Add: Add way to add event listener
223
+ - Change: Move document to https://discorb-lib.github.io/
224
+
225
+ ### v0.2.4
226
+
227
+ - Fix: Fix error in `Embed#image=`, `Embed#thumbnail=`
228
+
229
+ ### v0.2.3
230
+
231
+ - Fix: Fix critical error
232
+
233
+ ### v0.2.2 (yanked)
234
+
235
+ - Add: Add `Snowflake#to_str`
236
+
237
+ ### v0.2.1
238
+
239
+ - Fix: Fix NoMethodError in reaction event
240
+ - Add: Add Changelog.md to document
241
+
242
+ ### v0.2.0
243
+
244
+ - Fix: Fix unused dependency
245
+ - Add: Add `Client#close!`
246
+ - Add: Add discord-irb
247
+
248
+ ## v0.1
249
+
250
+ ### v0.1.0
251
+
252
+ - Add: Add `User#created_at`
253
+ - Add: Add `Member#to_s_user`
254
+ - Add: Add `DefaultAvatar`
255
+ - Add: Support application commands
256
+ - Add: Add `Client#ping`
257
+ - Add: Allow `String` for `Embed#initialize`
258
+ - Change: Change log format
259
+
260
+ ## v0.0
261
+
262
+ ### v0.0.8
263
+
264
+ - Delete: Delete task parameter
265
+
266
+ ### v0.0.7
267
+
268
+ - Fix: Fix `member_xxx` event
269
+
270
+ ### v0.0.6
271
+
272
+ - Fix: Fix error in client without members intent
273
+ - Add: Add ThreadChannel::News
274
+ - Add: Add official discord link
275
+
276
+ ### v0.0.5
277
+
278
+ - Fix: Fix GitHub link
279
+ - Change: Internet to HTTP
280
+
281
+ ### v0.0.4
282
+
283
+ - Fix: Fix NoMethodError by webhook message
284
+ - Add: Add `#author` to webhook message
285
+ - Fix: Add `#bot?` to webhook author
286
+
287
+ ### v0.0.3
288
+
289
+ - Fix: Fix no dependencies
290
+
291
+ ### v0.0.2
292
+
293
+ - Fix: Fix rubygems description
294
+
295
+ ### v0.0.1
296
+
297
+ - Initial release
298
+
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
- ![discorb](./assets/banner.svg)
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" 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" 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" 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" 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" 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
@@ -4,7 +4,7 @@ require "bundler/gem_tasks"
4
4
  require_relative "lib/discorb/utils/colored_puts"
5
5
  task default: %i[]
6
6
 
7
- # @!visibility private
7
+ # @private
8
8
  def get_version
9
9
  require_relative "lib/discorb/common"
10
10
  tag = `git tag --points-at HEAD`.force_encoding("utf-8").strip
@@ -90,6 +90,8 @@ namespace :document do
90
90
  require_relative "template-replace/scripts/version.rb"
91
91
  require_relative "template-replace/scripts/index.rb"
92
92
  require_relative "template-replace/scripts/yard_replace.rb"
93
+ require_relative "template-replace/scripts/favicon.rb"
94
+ require_relative "template-replace/scripts/arrow.rb"
93
95
  iputs "Resetting changes"
94
96
  Dir.glob("doc/#{version}/**/*.html") do |f|
95
97
  next if (m = f.match(/[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+)?/)) && m[0] != version
@@ -109,6 +111,10 @@ namespace :document do
109
111
  replace_index("doc/#{version}", version)
110
112
  iputs "Replacing YARD credits"
111
113
  yard_replace("doc/#{version}", version)
114
+ iputs "Adding favicon"
115
+ add_favicon("doc/#{version}")
116
+ iputs "Replacing arrow"
117
+ replace_arrow("doc/#{version}")
112
118
  iputs "Successfully replaced htmls"
113
119
  end
114
120