discorb 0.9.0 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build_main.yml +2 -0
- data/Changelog.md +28 -1
- data/README.md +6 -6
- data/Rakefile +7 -1
- data/assets/banner.svg +101 -101
- data/docs/application_command.md +8 -7
- data/docs/cli/run.md +3 -3
- data/docs/faq.md +1 -1
- data/docs/license.md +1 -1
- data/lib/discorb/app_command.rb +12 -10
- data/lib/discorb/application.rb +3 -3
- data/lib/discorb/asset.rb +2 -2
- data/lib/discorb/audit_logs.rb +7 -7
- data/lib/discorb/channel.rb +10 -10
- data/lib/discorb/common.rb +3 -3
- data/lib/discorb/components.rb +2 -2
- data/lib/discorb/embed.rb +2 -2
- data/lib/discorb/emoji.rb +3 -3
- data/lib/discorb/error.rb +2 -2
- data/lib/discorb/exe/init.rb +8 -8
- data/lib/discorb/exe/run.rb +1 -1
- data/lib/discorb/extend.rb +21 -0
- data/lib/discorb/extension.rb +1 -1
- data/lib/discorb/file.rb +19 -1
- data/lib/discorb/gateway.rb +10 -12
- data/lib/discorb/gateway_requests.rb +1 -1
- data/lib/discorb/guild.rb +7 -7
- data/lib/discorb/guild_template.rb +4 -4
- data/lib/discorb/http.rb +1 -1
- data/lib/discorb/integration.rb +3 -3
- data/lib/discorb/interaction.rb +104 -35
- data/lib/discorb/invite.rb +2 -2
- data/lib/discorb/log.rb +1 -1
- data/lib/discorb/member.rb +1 -1
- data/lib/discorb/message.rb +34 -10
- data/lib/discorb/modules.rb +11 -9
- data/lib/discorb/permission.rb +2 -2
- data/lib/discorb/presence.rb +8 -8
- data/lib/discorb/rate_limit.rb +1 -1
- data/lib/discorb/reaction.rb +1 -1
- data/lib/discorb/role.rb +2 -2
- data/lib/discorb/sticker.rb +3 -3
- data/lib/discorb/user.rb +2 -2
- data/lib/discorb/utils/colored_puts.rb +3 -3
- data/lib/discorb/utils.rb +1 -1
- data/lib/discorb/voice_state.rb +3 -3
- data/lib/discorb/webhook.rb +7 -8
- data/lib/discorb.rb +1 -1
- data/sig/discorb.rbs +2 -2
- data/template-replace/files/css/common.css +25 -0
- data/template-replace/files/favicon.png +0 -0
- data/template-replace/scripts/arrow.rb +7 -0
- data/template-replace/scripts/favicon.rb +9 -0
- metadata +5 -2
data/lib/discorb/webhook.rb
CHANGED
@@ -22,7 +22,7 @@ module Discorb
|
|
22
22
|
# @return [String] The URL of the webhook.
|
23
23
|
attr_reader :token
|
24
24
|
|
25
|
-
#
|
25
|
+
# @private
|
26
26
|
def initialize(client, data)
|
27
27
|
@name = data[:name]
|
28
28
|
@guild_id = data[:guild_id] && Snowflake.new(data[:guild_id])
|
@@ -154,7 +154,6 @@ module Discorb
|
|
154
154
|
payload[:content] = content if content != :unset
|
155
155
|
payload[:embeds] = embed ? [embed.to_hash] : [] if embed != :unset
|
156
156
|
payload[:embeds] = embeds.map(&:to_hash) if embeds != :unset
|
157
|
-
attachments = [attachment] if attachment != :unset
|
158
157
|
payload[:attachments] = attachments.map(&:to_hash) if attachments != :unset
|
159
158
|
payload[:allowed_mentions] = allowed_mentions if allowed_mentions != :unset
|
160
159
|
files = [file] if file != :unset
|
@@ -209,7 +208,7 @@ module Discorb
|
|
209
208
|
# @!attribute [r] url
|
210
209
|
# @return [String] The URL of the webhook.
|
211
210
|
|
212
|
-
#
|
211
|
+
# @private
|
213
212
|
def initialize(client, data)
|
214
213
|
super
|
215
214
|
@token = data[:token]
|
@@ -231,7 +230,7 @@ module Discorb
|
|
231
230
|
# Represents a source channel of follower webhook.
|
232
231
|
# @return [Discorb::Channel, Discorb::Webhook::FollowerWebhook::Channel] The source channel of follower webhook.
|
233
232
|
|
234
|
-
#
|
233
|
+
# @private
|
235
234
|
def initialize(client, data)
|
236
235
|
super
|
237
236
|
@source_guild = FollowerWebhook::Guild.new(data[:source_guild])
|
@@ -257,7 +256,7 @@ module Discorb
|
|
257
256
|
# @return [Discorb::Asset] The icon of the guild.
|
258
257
|
attr_reader :icon
|
259
258
|
|
260
|
-
#
|
259
|
+
# @private
|
261
260
|
def initialize(data)
|
262
261
|
@id = Snowflake.new(data[:id])
|
263
262
|
@name = data[:name]
|
@@ -274,7 +273,7 @@ module Discorb
|
|
274
273
|
# @return [String] The name of the channel.
|
275
274
|
attr_reader :name
|
276
275
|
|
277
|
-
#
|
276
|
+
# @private
|
278
277
|
def initialize(data)
|
279
278
|
@id = Snowflake.new(data[:id])
|
280
279
|
@name = data[:name]
|
@@ -299,7 +298,7 @@ module Discorb
|
|
299
298
|
# @return [Discorb::Snowflake] The ID of the guild.
|
300
299
|
attr_reader :guild_id
|
301
300
|
|
302
|
-
#
|
301
|
+
# @private
|
303
302
|
def initialize(webhook, data, client = nil)
|
304
303
|
@client = client
|
305
304
|
@webhook = webhook
|
@@ -371,7 +370,7 @@ module Discorb
|
|
371
370
|
# @return [String] The discriminator of the author.
|
372
371
|
attr_reader :discriminator
|
373
372
|
|
374
|
-
#
|
373
|
+
# @private
|
375
374
|
def initialize(data)
|
376
375
|
@data = data
|
377
376
|
@bot = data[:bot]
|
data/lib/discorb.rb
CHANGED
data/sig/discorb.rbs
CHANGED
@@ -13,7 +13,7 @@ module Discorb
|
|
13
13
|
|
14
14
|
def macro: () -> void
|
15
15
|
|
16
|
-
#
|
16
|
+
# @private
|
17
17
|
class Logger
|
18
18
|
def initialize: (untyped _out, untyped colorize_log, untyped level) -> void
|
19
19
|
|
@@ -2132,7 +2132,7 @@ module Discorb
|
|
2132
2132
|
def to_s: () -> String
|
2133
2133
|
end
|
2134
2134
|
|
2135
|
-
#
|
2135
|
+
# @private
|
2136
2136
|
module Utils
|
2137
2137
|
def try: (untyped object, untyped message) -> untyped
|
2138
2138
|
|
@@ -527,4 +527,29 @@ dd pre.code {
|
|
527
527
|
padding: 9px 14px;
|
528
528
|
border-radius: 4px;
|
529
529
|
border: 1px solid var(--background-tertiary);
|
530
|
+
}
|
531
|
+
|
532
|
+
#main {
|
533
|
+
max-width: 100vw;
|
534
|
+
}
|
535
|
+
|
536
|
+
#search input{
|
537
|
+
appearance: none;
|
538
|
+
}
|
539
|
+
|
540
|
+
.fixed_header{
|
541
|
+
padding-bottom: 0;
|
542
|
+
height: 80px;
|
543
|
+
}
|
544
|
+
|
545
|
+
#full_list_header{
|
546
|
+
font-size: 1.2em;
|
547
|
+
}
|
548
|
+
|
549
|
+
#search{
|
550
|
+
display: inline !important;
|
551
|
+
}
|
552
|
+
|
553
|
+
p.signature, h3.signature, p.signature tt, h3.signature tt{
|
554
|
+
font-family: var(--monospace-font);
|
530
555
|
}
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discorb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sevenc-nanashi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -179,7 +179,10 @@ files:
|
|
179
179
|
- po/yard.pot
|
180
180
|
- sig/discorb.rbs
|
181
181
|
- template-replace/files/css/common.css
|
182
|
+
- template-replace/files/favicon.png
|
182
183
|
- template-replace/resources/version_list.html
|
184
|
+
- template-replace/scripts/arrow.rb
|
185
|
+
- template-replace/scripts/favicon.rb
|
183
186
|
- template-replace/scripts/index.rb
|
184
187
|
- template-replace/scripts/sidebar.rb
|
185
188
|
- template-replace/scripts/version.rb
|