discorb 0.18.1 → 0.19.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.
- checksums.yaml +4 -4
- data/Changelog.md +9 -0
- data/Gemfile +4 -4
- data/Rakefile +17 -22
- data/Steepfile +8 -6
- data/docs/events.md +2 -2
- data/docs/voice_events.md +6 -6
- data/lib/discorb/automod.rb +1 -1
- data/lib/discorb/channel/guild.rb +3 -3
- data/lib/discorb/channel/text.rb +3 -3
- data/lib/discorb/client.rb +4 -6
- data/lib/discorb/common.rb +1 -1
- data/lib/discorb/embed.rb +1 -1
- data/lib/discorb/emoji.rb +2 -2
- data/lib/discorb/event.rb +2 -2
- data/lib/discorb/gateway.rb +17 -7
- data/lib/discorb/guild.rb +4 -4
- data/lib/discorb/guild_template.rb +2 -2
- data/lib/discorb/integration.rb +2 -2
- data/lib/discorb/interaction/response.rb +83 -77
- data/lib/discorb/interaction/root.rb +136 -0
- data/lib/discorb/invite.rb +1 -1
- data/lib/discorb/message.rb +4 -4
- data/lib/discorb/modules.rb +2 -2
- data/lib/discorb/permission.rb +3 -1
- data/lib/discorb/role.rb +2 -2
- data/lib/discorb/shard.rb +1 -1
- data/lib/discorb/sticker.rb +2 -2
- data/lib/discorb/voice_state.rb +3 -3
- data/lib/discorb/webhook.rb +5 -5
- data/sig/discorb/activity.rbs +1 -0
- data/sig/discorb/allowed_mentions.rbs +1 -0
- data/sig/discorb/app_command/base.rbs +6 -0
- data/sig/discorb/application.rbs +4 -0
- data/sig/discorb/asset.rbs +2 -0
- data/sig/discorb/attachment.rbs +8 -0
- data/sig/discorb/audit_log.rbs +7 -0
- data/sig/discorb/automod.rbs +22 -5
- data/sig/discorb/avatar.rbs +1 -0
- data/sig/discorb/channel/base.rbs +8 -1
- data/sig/discorb/channel/category.rbs +1 -0
- data/sig/discorb/channel/container.rbs +4 -0
- data/sig/discorb/channel/stage.rbs +4 -0
- data/sig/discorb/channel/text.rbs +2 -2
- data/sig/discorb/channel/thread.rbs +11 -0
- data/sig/discorb/channel/voice.rbs +2 -0
- data/sig/discorb/client.rbs +21 -20
- data/sig/discorb/color.rbs +6 -0
- data/sig/discorb/component/base.rbs +1 -0
- data/sig/discorb/component/button.rbs +2 -0
- data/sig/discorb/component/select_menu.rbs +4 -0
- data/sig/discorb/component/text_input.rbs +1 -0
- data/sig/discorb/custom_emoji.rbs +5 -1
- data/sig/discorb/dictionary.rbs +2 -0
- data/sig/discorb/discord_model.rbs +2 -0
- data/sig/discorb/embed.rbs +7 -0
- data/sig/discorb/emoji.rbs +1 -0
- data/sig/discorb/event_handler.rbs +2 -1
- data/sig/discorb/extension.rbs +13 -12
- data/sig/discorb/flag.rbs +2 -0
- data/sig/discorb/gateway.rbs +5 -0
- data/sig/discorb/guild.rbs +6 -4
- data/sig/discorb/guild_template.rbs +1 -1
- data/sig/discorb/http.rbs +4 -1
- data/sig/discorb/image.rbs +2 -0
- data/sig/discorb/integration.rbs +1 -1
- data/sig/discorb/intents.rbs +4 -3
- data/sig/discorb/interaction/base.rbs +33 -0
- data/sig/discorb/interaction/message_component.rbs +1 -2
- data/sig/discorb/interaction/modal.rbs +1 -2
- data/sig/discorb/interaction/responder.rbs +49 -49
- data/sig/discorb/invite.rbs +1 -1
- data/sig/discorb/member.rbs +2 -0
- data/sig/discorb/message.rbs +6 -1
- data/sig/discorb/messageable.rbs +1 -4
- data/sig/discorb/partial_emoji.rbs +3 -0
- data/sig/discorb/permissions.rbs +7 -0
- data/sig/discorb/presence.rbs +2 -0
- data/sig/discorb/reaction.rbs +5 -1
- data/sig/discorb/role.rbs +7 -1
- data/sig/discorb/scheduled_event.rbs +2 -1
- data/sig/discorb/shard.rbs +2 -1
- data/sig/discorb/snowflake.rbs +2 -0
- data/sig/discorb/stage_instance.rbs +9 -3
- data/sig/discorb/sticker.rbs +1 -1
- data/sig/discorb/unicode_emoji.rbs +4 -0
- data/sig/discorb/user.rbs +2 -0
- data/sig/discorb/webhook.rbs +17 -6
- data/sig/discorb/welcome_screen.rbs +1 -0
- data/sig/override.rbs +2 -0
- metadata +3 -3
data/sig/discorb/image.rbs
CHANGED
data/sig/discorb/integration.rbs
CHANGED
|
@@ -24,7 +24,7 @@ module Discorb
|
|
|
24
24
|
# @param [String] reason The reason for deleting the integration.
|
|
25
25
|
#
|
|
26
26
|
# @return [Async::Task<void>] The task.
|
|
27
|
-
def delete
|
|
27
|
+
def delete: (?reason: String?) -> Async::Task[void]
|
|
28
28
|
|
|
29
29
|
# @return [Discorb::Snowflake] The ID of the integration.
|
|
30
30
|
attr_reader id: Discorb::Snowflake
|
data/sig/discorb/intents.rbs
CHANGED
|
@@ -30,8 +30,6 @@ module Discorb
|
|
|
30
30
|
# this will be required in September 1, 2022. [Learn More](https://support-dev.discord.com/hc/en-us/articles/4404772028055).
|
|
31
31
|
# You should specify `message_content` intent for preventing unexpected changes in the future.
|
|
32
32
|
def initialize: (
|
|
33
|
-
automod_configuration: bool,
|
|
34
|
-
automod_execution: bool,
|
|
35
33
|
?guilds: bool,
|
|
36
34
|
?members: bool,
|
|
37
35
|
?bans: bool,
|
|
@@ -48,7 +46,9 @@ module Discorb
|
|
|
48
46
|
?dm_reactions: bool,
|
|
49
47
|
?dm_typing: bool,
|
|
50
48
|
?message_content: bool?,
|
|
51
|
-
?scheduled_events: bool
|
|
49
|
+
?scheduled_events: bool,
|
|
50
|
+
?automod_configuration: bool,
|
|
51
|
+
?automod_execution: bool
|
|
52
52
|
) -> void
|
|
53
53
|
|
|
54
54
|
#
|
|
@@ -61,6 +61,7 @@ module Discorb
|
|
|
61
61
|
# @return [Integer] The value of the intent.
|
|
62
62
|
def value: -> Integer
|
|
63
63
|
|
|
64
|
+
%a{pure}
|
|
64
65
|
def inspect: -> String
|
|
65
66
|
|
|
66
67
|
def to_h: -> Hash[Symbol, bool]
|
|
@@ -12,12 +12,45 @@ module Discorb
|
|
|
12
12
|
# @param [Hash] data The data of the interaction.
|
|
13
13
|
def initialize: (Discorb::Client client, Discorb::json data) -> void
|
|
14
14
|
|
|
15
|
+
%a{pure}
|
|
15
16
|
def guild: -> Discorb::Guild?
|
|
16
17
|
|
|
18
|
+
%a{pure}
|
|
17
19
|
def channel: -> Discorb::Channel
|
|
18
20
|
|
|
21
|
+
%a{pure}
|
|
19
22
|
def inspect: -> String
|
|
20
23
|
|
|
24
|
+
#
|
|
25
|
+
# Edit the original response message.
|
|
26
|
+
# @async
|
|
27
|
+
# @macro edit
|
|
28
|
+
#
|
|
29
|
+
# @param [String] content The new content of the message.
|
|
30
|
+
# @param [Discorb::Embed] embed The new embed of the message.
|
|
31
|
+
# @param [Array<Discorb::Embed>] embeds The new embeds of the message.
|
|
32
|
+
# @param [Array<Discorb::Attachment>] attachments The attachments to remain.
|
|
33
|
+
# @param [Discorb::Attachment] file The file to send.
|
|
34
|
+
# @param [Array<Discorb::Attachment>] files The files to send.
|
|
35
|
+
#
|
|
36
|
+
# @return [Async::Task<void>] The task.
|
|
37
|
+
def edit_original_message: (
|
|
38
|
+
?String? content,
|
|
39
|
+
?embed: Discorb::Embed?,
|
|
40
|
+
?embeds: ::Array[Discorb::Embed]?,
|
|
41
|
+
?attachment: Discorb::Attachment?,
|
|
42
|
+
?attachments: ::Array[Discorb::Attachment]?,
|
|
43
|
+
?components: (::Array[Discorb::Component]
|
|
44
|
+
| ::Array[::Array[Discorb::Component]])?
|
|
45
|
+
) -> Async::Task[void]
|
|
46
|
+
|
|
47
|
+
#
|
|
48
|
+
# Delete the original response message.
|
|
49
|
+
# @async
|
|
50
|
+
#
|
|
51
|
+
# @return [Async::Task<void>] The task.
|
|
52
|
+
def delete_original_message: -> Async::Task[void]
|
|
53
|
+
|
|
21
54
|
#
|
|
22
55
|
# Create a new Interaction instance from the data.
|
|
23
56
|
# @private
|
|
@@ -107,8 +107,7 @@ module Discorb
|
|
|
107
107
|
?components: (::Array[Discorb::Component]
|
|
108
108
|
| ::Array[::Array[Discorb::Component]])?,
|
|
109
109
|
?ephemeral: bool
|
|
110
|
-
) -> (Discorb::Interaction::
|
|
111
|
-
| Discorb::Webhook::Message)
|
|
110
|
+
) -> (Discorb::Interaction::CallbackMessage | Discorb::Webhook::Message)
|
|
112
111
|
|
|
113
112
|
# @return [String] The content of the response.
|
|
114
113
|
attr_reader custom_id: String
|
|
@@ -38,8 +38,7 @@ module Discorb
|
|
|
38
38
|
?components: (::Array[Discorb::Component]
|
|
39
39
|
| ::Array[::Array[Discorb::Component]])?,
|
|
40
40
|
?ephemeral: bool
|
|
41
|
-
) -> (Discorb::Interaction::
|
|
42
|
-
| Discorb::Webhook::Message)
|
|
41
|
+
) -> (Discorb::Interaction::CallbackMessage | Discorb::Webhook::Message)
|
|
43
42
|
|
|
44
43
|
# @return [String] The custom id of the modal.
|
|
45
44
|
attr_reader custom_id: String
|
|
@@ -41,59 +41,59 @@ module Discorb
|
|
|
41
41
|
?components: (::Array[Discorb::Component]
|
|
42
42
|
| ::Array[::Array[Discorb::Component]])?,
|
|
43
43
|
?ephemeral: bool
|
|
44
|
-
) -> (Discorb::Interaction::
|
|
45
|
-
|
|
44
|
+
) -> (Discorb::Interaction::CallbackMessage | Discorb::Webhook::Message)
|
|
45
|
+
end
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
#
|
|
48
|
+
# Represents of a callback message of interaction.
|
|
49
|
+
class CallbackMessage
|
|
50
|
+
#
|
|
51
|
+
# Initializes a new instance of CallbackMessage.
|
|
52
|
+
# @private
|
|
53
|
+
#
|
|
54
|
+
# @param [Client] client The client.
|
|
55
|
+
# @param [Hash] data The payload.
|
|
56
|
+
# @param [String] application_id The application ID.
|
|
57
|
+
# @param [String] token The token.
|
|
58
|
+
def initialize: (
|
|
59
|
+
Client client,
|
|
60
|
+
Discorb::json data,
|
|
61
|
+
String application_id,
|
|
62
|
+
String token
|
|
63
|
+
) -> void
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
65
|
+
#
|
|
66
|
+
# Edits the callback message.
|
|
67
|
+
# @async
|
|
68
|
+
# @macro edit
|
|
69
|
+
#
|
|
70
|
+
# @param [String] content The new content of the message.
|
|
71
|
+
# @param [Discorb::Embed] embed The new embed of the message.
|
|
72
|
+
# @param [Array<Discorb::Embed>] embeds The new embeds of the message.
|
|
73
|
+
# @param [Array<Discorb::Attachment>] attachments The attachments to remain.
|
|
74
|
+
# @param [Discorb::Attachment] file The file to send.
|
|
75
|
+
# @param [Array<Discorb::Attachment>] files The files to send.
|
|
76
|
+
#
|
|
77
|
+
# @return [Async::Task<void>] The task.
|
|
78
|
+
def edit: (
|
|
79
|
+
?String content,
|
|
80
|
+
?embed: Discorb::Embed,
|
|
81
|
+
?embeds: ::Array[Discorb::Embed],
|
|
82
|
+
?file: Discorb::Attachment,
|
|
83
|
+
?files: ::Array[Discorb::Attachment],
|
|
84
|
+
?attachments: ::Array[Discorb::Attachment]
|
|
85
|
+
) -> Async::Task[void]
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
#
|
|
88
|
+
# Deletes the callback message.
|
|
89
|
+
# @async
|
|
90
|
+
# @note This will fail if the message is ephemeral.
|
|
91
|
+
#
|
|
92
|
+
# @return [Async::Task<void>] The task.
|
|
93
|
+
def delete: -> Async::Task[void]
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
%a{pure}
|
|
96
|
+
def inspect: -> String
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
#
|
data/sig/discorb/invite.rbs
CHANGED
|
@@ -20,7 +20,7 @@ module Discorb
|
|
|
20
20
|
# Delete the invite.
|
|
21
21
|
# @async
|
|
22
22
|
# @return [Async::Task<void>] The task.
|
|
23
|
-
def delete
|
|
23
|
+
def delete: (?reason: String?) -> Async::Task[void]
|
|
24
24
|
|
|
25
25
|
# @return [String] The code of invite.
|
|
26
26
|
attr_reader code: String
|
data/sig/discorb/member.rbs
CHANGED
data/sig/discorb/message.rbs
CHANGED
|
@@ -68,7 +68,7 @@ module Discorb
|
|
|
68
68
|
# @param [String] reason The reason for deleting the message.
|
|
69
69
|
#
|
|
70
70
|
# @return [Async::Task<void>] The task.
|
|
71
|
-
def delete
|
|
71
|
+
def delete: (?reason: String?) -> Async::Task[void]
|
|
72
72
|
|
|
73
73
|
#
|
|
74
74
|
# Convert the message to reference object.
|
|
@@ -171,6 +171,7 @@ module Discorb
|
|
|
171
171
|
) -> Async::Task[Discorb::ThreadChannel]
|
|
172
172
|
|
|
173
173
|
# Meta
|
|
174
|
+
%a{pure}
|
|
174
175
|
def inspect: -> String
|
|
175
176
|
|
|
176
177
|
# @return [Discorb::Snowflake] The ID of the message.
|
|
@@ -386,6 +387,7 @@ module Discorb
|
|
|
386
387
|
# @see https://discord.com/developers/docs/resources/channel#message-reference-object
|
|
387
388
|
def self.from_hash: (Discorb::json data) -> Discorb::Message::Reference
|
|
388
389
|
|
|
390
|
+
%a{pure}
|
|
389
391
|
def inspect: -> String
|
|
390
392
|
|
|
391
393
|
# @return [Discorb::Snowflake] The guild ID.
|
|
@@ -406,6 +408,7 @@ module Discorb
|
|
|
406
408
|
class Sticker
|
|
407
409
|
def initialize: (untyped data) -> void
|
|
408
410
|
|
|
411
|
+
%a{pure}
|
|
409
412
|
def inspect: -> String
|
|
410
413
|
|
|
411
414
|
# @return [Discorb::Snowflake] The sticker ID.
|
|
@@ -429,6 +432,7 @@ module Discorb
|
|
|
429
432
|
# @param [Hash] data The interaction data.
|
|
430
433
|
def initialize: (Discorb::Client client, Discorb::json data) -> void
|
|
431
434
|
|
|
435
|
+
%a{pure}
|
|
432
436
|
def inspect: -> String
|
|
433
437
|
|
|
434
438
|
# @return [Discorb::Snowflake] The interaction ID.
|
|
@@ -457,6 +461,7 @@ module Discorb
|
|
|
457
461
|
# @param [Hash] data The activity data.
|
|
458
462
|
def initialize: (Discorb::json data) -> void
|
|
459
463
|
|
|
464
|
+
%a{pure}
|
|
460
465
|
def inspect: -> String
|
|
461
466
|
|
|
462
467
|
# @return [String] The name of activity.
|
data/sig/discorb/messageable.rbs
CHANGED
|
@@ -72,10 +72,7 @@ module Discorb
|
|
|
72
72
|
# @param [String] reason The reason for deleting the message.
|
|
73
73
|
#
|
|
74
74
|
# @return [Async::Task<void>] The task.
|
|
75
|
-
def delete_message
|
|
76
|
-
_ToS message_id,
|
|
77
|
-
?reason: String?
|
|
78
|
-
) -> Async::Task[void]
|
|
75
|
+
def delete_message: (_ToS message_id, ?reason: String?) -> Async::Task[void]
|
|
79
76
|
|
|
80
77
|
#
|
|
81
78
|
# Fetch a message from ID.
|
|
@@ -13,14 +13,17 @@ module Discorb
|
|
|
13
13
|
# Format the emoji for URI.
|
|
14
14
|
#
|
|
15
15
|
# @return [String] the formatted emoji.
|
|
16
|
+
%a{pure}
|
|
16
17
|
def to_uri: -> String
|
|
17
18
|
|
|
19
|
+
%a{pure}
|
|
18
20
|
def inspect: -> String
|
|
19
21
|
|
|
20
22
|
#
|
|
21
23
|
# Format the emoji for sending.
|
|
22
24
|
#
|
|
23
25
|
# @return [String] the formatted emoji.
|
|
26
|
+
%a{pure}
|
|
24
27
|
def to_s: -> String
|
|
25
28
|
|
|
26
29
|
# @return [Discorb::Snowflake] The ID of the emoji.
|
data/sig/discorb/permissions.rbs
CHANGED
|
@@ -91,20 +91,26 @@ module Discorb
|
|
|
91
91
|
# @param deny [Integer] The denied permissions.
|
|
92
92
|
def initialize: (Integer allow, Integer deny) -> void
|
|
93
93
|
|
|
94
|
+
%a{pure}
|
|
94
95
|
def allow: -> Discorb::Permission
|
|
95
96
|
|
|
97
|
+
%a{pure}
|
|
96
98
|
def deny: -> Discorb::Permission
|
|
97
99
|
|
|
100
|
+
%a{pure}
|
|
98
101
|
def allow_value: -> Integer
|
|
99
102
|
|
|
103
|
+
%a{pure}
|
|
100
104
|
def deny_value: -> Integer
|
|
101
105
|
|
|
106
|
+
%a{pure}
|
|
102
107
|
def inspect: -> String
|
|
103
108
|
|
|
104
109
|
#
|
|
105
110
|
# Converts the permission overwrite to a hash.
|
|
106
111
|
#
|
|
107
112
|
# @return [Hash] The permission overwrite as a hash.
|
|
113
|
+
%a{pure}
|
|
108
114
|
def to_hash: -> Hash[Symbol, bool]
|
|
109
115
|
|
|
110
116
|
#
|
|
@@ -121,6 +127,7 @@ module Discorb
|
|
|
121
127
|
# @param [Symbol] field The field to check.
|
|
122
128
|
#
|
|
123
129
|
# @return [true, false, nil] Whether the field is allowed, denied or not set.
|
|
130
|
+
%a{pure}
|
|
124
131
|
def []: (Symbol field) -> bool?
|
|
125
132
|
|
|
126
133
|
#
|
data/sig/discorb/presence.rbs
CHANGED
|
@@ -10,6 +10,7 @@ module Discorb
|
|
|
10
10
|
# @param [Hash] data The data of the presence.
|
|
11
11
|
def initialize: (Discorb::Client client, Discorb::json data) -> void
|
|
12
12
|
|
|
13
|
+
%a{pure}
|
|
13
14
|
def inspect: -> String
|
|
14
15
|
|
|
15
16
|
# @return [:online, :idle, :dnd, :offline] The status of the user.
|
|
@@ -46,6 +47,7 @@ module Discorb
|
|
|
46
47
|
# Convert the activity to a string.
|
|
47
48
|
#
|
|
48
49
|
# @return [String] The string representation of the activity.
|
|
50
|
+
%a{pure}
|
|
49
51
|
def to_s: -> String
|
|
50
52
|
|
|
51
53
|
# @return [String] The name of the activity.
|
data/sig/discorb/reaction.rbs
CHANGED
|
@@ -16,7 +16,11 @@ module Discorb
|
|
|
16
16
|
# @param (see Message#fetch_reacted_users)
|
|
17
17
|
#
|
|
18
18
|
# @return [Async::Task<Array<Discorb::User>>] The users that reacted with this emoji.
|
|
19
|
-
def fetch_users:
|
|
19
|
+
def fetch_users: (
|
|
20
|
+
Discorb::emoji emoji,
|
|
21
|
+
?limit: Integer?,
|
|
22
|
+
?after: Discorb::Snowflake?
|
|
23
|
+
) -> Async::Task[::Array[Discorb::User]]
|
|
20
24
|
|
|
21
25
|
# @return [Integer] The number of users that have reacted with this emoji.
|
|
22
26
|
attr_reader count: Integer
|
data/sig/discorb/role.rbs
CHANGED
|
@@ -17,6 +17,7 @@ module Discorb
|
|
|
17
17
|
Discorb::json data
|
|
18
18
|
) -> void
|
|
19
19
|
|
|
20
|
+
%a{pure}
|
|
20
21
|
def icon: -> (Discorb::Asset | Discorb::emoji | nil)
|
|
21
22
|
|
|
22
23
|
#
|
|
@@ -31,12 +32,16 @@ module Discorb
|
|
|
31
32
|
# Formats the role as a string.
|
|
32
33
|
#
|
|
33
34
|
# @return [String] The formatted string.
|
|
35
|
+
%a{pure}
|
|
34
36
|
def to_s: -> String
|
|
35
37
|
|
|
38
|
+
%a{pure}
|
|
36
39
|
def mention: -> String
|
|
37
40
|
|
|
41
|
+
%a{pure}
|
|
38
42
|
def color?: -> bool
|
|
39
43
|
|
|
44
|
+
%a{pure}
|
|
40
45
|
def inspect: -> String
|
|
41
46
|
|
|
42
47
|
#
|
|
@@ -79,8 +84,9 @@ module Discorb
|
|
|
79
84
|
# @param [String] reason The reason for deleting the role.
|
|
80
85
|
#
|
|
81
86
|
# @return [Async::Task<void>] The task.
|
|
82
|
-
def delete
|
|
87
|
+
def delete: (?reason: String?) -> Async::Task[void]
|
|
83
88
|
|
|
89
|
+
%a{pure}
|
|
84
90
|
def tag: -> Discorb::Role::Tag
|
|
85
91
|
|
|
86
92
|
# @return [Discorb::Snowflake] The ID of the role.
|
|
@@ -57,7 +57,7 @@ module Discorb
|
|
|
57
57
|
# @async
|
|
58
58
|
#
|
|
59
59
|
# @return [Async::Task<void>] The task.
|
|
60
|
-
def delete
|
|
60
|
+
def delete: -> Async::Task[void]
|
|
61
61
|
|
|
62
62
|
#
|
|
63
63
|
# Fetches the event users.
|
|
@@ -139,6 +139,7 @@ module Discorb
|
|
|
139
139
|
# @!visibility private
|
|
140
140
|
def initialize: (untyped data) -> void
|
|
141
141
|
|
|
142
|
+
%a{pure}
|
|
142
143
|
def inspect: -> String
|
|
143
144
|
|
|
144
145
|
# @return [String, nil] The location of the event. Only present if the event is a external event.
|
data/sig/discorb/shard.rbs
CHANGED
data/sig/discorb/snowflake.rbs
CHANGED
|
@@ -15,16 +15,22 @@ module Discorb
|
|
|
15
15
|
?no_cache: bool
|
|
16
16
|
) -> void
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
%a{pure}
|
|
19
|
+
def guild: -> Discorb::Guild
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
%a{pure}
|
|
22
|
+
def channel: -> Discorb::StageChannel
|
|
21
23
|
|
|
24
|
+
%a{pure}
|
|
22
25
|
def discoverable?: -> bool
|
|
23
26
|
|
|
27
|
+
%a{pure}
|
|
24
28
|
def public?: -> bool
|
|
25
29
|
|
|
30
|
+
%a{pure}
|
|
26
31
|
def guild_only?: -> bool
|
|
27
32
|
|
|
33
|
+
%a{pure}
|
|
28
34
|
def inspect: -> String
|
|
29
35
|
|
|
30
36
|
#
|
|
@@ -49,7 +55,7 @@ module Discorb
|
|
|
49
55
|
# @param [String] reason The reason for deleting the stage instance.
|
|
50
56
|
#
|
|
51
57
|
# @return [Async::Task<void>] The task.
|
|
52
|
-
def delete
|
|
58
|
+
def delete: (?reason: String?) -> Async::Task[void]
|
|
53
59
|
|
|
54
60
|
# @return [Discorb::Snowflake] The ID of the guild this voice state is for.
|
|
55
61
|
attr_reader id: Discorb::Snowflake
|
data/sig/discorb/sticker.rbs
CHANGED
|
@@ -10,14 +10,17 @@ module Discorb
|
|
|
10
10
|
def initialize: (String name, ?tone: Integer) -> void
|
|
11
11
|
|
|
12
12
|
# @return [String] The unicode string of the emoji.
|
|
13
|
+
%a{pure}
|
|
13
14
|
def to_s: -> String
|
|
14
15
|
|
|
15
16
|
#
|
|
16
17
|
# Format the emoji for URI.
|
|
17
18
|
#
|
|
18
19
|
# @return [String] the formatted emoji.
|
|
20
|
+
%a{pure}
|
|
19
21
|
def to_uri: -> String
|
|
20
22
|
|
|
23
|
+
%a{pure}
|
|
21
24
|
def inspect: -> String
|
|
22
25
|
|
|
23
26
|
#
|
|
@@ -25,6 +28,7 @@ module Discorb
|
|
|
25
28
|
# @private
|
|
26
29
|
#
|
|
27
30
|
# @return [Hash] The hash represents the object.
|
|
31
|
+
%a{pure}
|
|
28
32
|
def to_hash: -> Discorb::json
|
|
29
33
|
|
|
30
34
|
# @return [String] The name of the emoji. (e.g. :grinning:)
|
data/sig/discorb/user.rbs
CHANGED
data/sig/discorb/webhook.rbs
CHANGED
|
@@ -11,6 +11,7 @@ module Discorb
|
|
|
11
11
|
# @param [Hash] data The data of the webhook.
|
|
12
12
|
def initialize: (Discorb::Client client, Discorb::json data) -> void
|
|
13
13
|
|
|
14
|
+
%a{pure}
|
|
14
15
|
def inspect: -> String
|
|
15
16
|
|
|
16
17
|
#
|
|
@@ -64,7 +65,7 @@ module Discorb
|
|
|
64
65
|
# @async
|
|
65
66
|
#
|
|
66
67
|
# @return [Async::Task<void>] The task.
|
|
67
|
-
def delete
|
|
68
|
+
def delete: -> Async::Task[void]
|
|
68
69
|
|
|
69
70
|
#
|
|
70
71
|
# Edits the webhook's message.
|
|
@@ -98,9 +99,7 @@ module Discorb
|
|
|
98
99
|
# @param [Discorb::Webhook::Message] message The message to delete.
|
|
99
100
|
#
|
|
100
101
|
# @return [Async::Task<void>] The task.
|
|
101
|
-
def delete_message
|
|
102
|
-
Discorb::Webhook::Message message
|
|
103
|
-
) -> Async::Task[void]
|
|
102
|
+
def delete_message: (Discorb::Webhook::Message message) -> Async::Task[void]
|
|
104
103
|
|
|
105
104
|
#
|
|
106
105
|
# Creates URLWebhook.
|
|
@@ -209,6 +208,7 @@ module Discorb
|
|
|
209
208
|
# @param [Hash] data The data of the guild.
|
|
210
209
|
def initialize: (Discorb::json data) -> void
|
|
211
210
|
|
|
211
|
+
%a{pure}
|
|
212
212
|
def inspect: -> String
|
|
213
213
|
|
|
214
214
|
# @return [Discorb::Snowflake] The ID of the guild.
|
|
@@ -231,6 +231,7 @@ module Discorb
|
|
|
231
231
|
# @param [Hash] data The data of the channel.
|
|
232
232
|
def initialize: (Discorb::json data) -> void
|
|
233
233
|
|
|
234
|
+
%a{pure}
|
|
234
235
|
def inspect: -> String
|
|
235
236
|
|
|
236
237
|
# @return [Discorb::Snowflake] The ID of the channel.
|
|
@@ -272,14 +273,22 @@ module Discorb
|
|
|
272
273
|
# @param (see Webhook#edit_message)
|
|
273
274
|
#
|
|
274
275
|
# @return [Async::Task<void>] The task.
|
|
275
|
-
def edit:
|
|
276
|
+
def edit: (
|
|
277
|
+
?String content,
|
|
278
|
+
?embed: Discorb::Embed,
|
|
279
|
+
?embeds: ::Array[Discorb::Embed],
|
|
280
|
+
?file: Discorb::Attachment,
|
|
281
|
+
?files: ::Array[Discorb::Attachment],
|
|
282
|
+
?attachments: ::Array[Discorb::Attachment],
|
|
283
|
+
?allowed_mentions: Discorb::AllowedMentions
|
|
284
|
+
) -> Async::Task[void]
|
|
276
285
|
|
|
277
286
|
#
|
|
278
287
|
# Deletes the message.
|
|
279
288
|
# @async
|
|
280
289
|
#
|
|
281
290
|
# @return [Async::Task<void>] The task.
|
|
282
|
-
def delete
|
|
291
|
+
def delete: -> Async::Task[void]
|
|
283
292
|
|
|
284
293
|
# @return [Discorb::Snowflake] The ID of the channel.
|
|
285
294
|
attr_reader channel_id: Discorb::Snowflake
|
|
@@ -301,8 +310,10 @@ module Discorb
|
|
|
301
310
|
# Format author with `Name#Discriminator` style.
|
|
302
311
|
#
|
|
303
312
|
# @return [String] Formatted author.
|
|
313
|
+
%a{pure}
|
|
304
314
|
def to_s: -> String
|
|
305
315
|
|
|
316
|
+
%a{pure}
|
|
306
317
|
def inspect: -> String
|
|
307
318
|
|
|
308
319
|
# @return [Boolean] Whether the author is a bot.
|
data/sig/override.rbs
CHANGED
|
@@ -6,6 +6,7 @@ class Time
|
|
|
6
6
|
# @param ["f", "F", "d", "D", "t", "T", "R"] type The format to use.
|
|
7
7
|
#
|
|
8
8
|
# @return [String] The formatted time.
|
|
9
|
+
%a{pure}
|
|
9
10
|
def to_df: (?("f" | "F" | "d" | "D" | "t" | "T" | "R")? `type`) -> String
|
|
10
11
|
end
|
|
11
12
|
|
|
@@ -14,6 +15,7 @@ module Async
|
|
|
14
15
|
class Node
|
|
15
16
|
def description: -> untyped
|
|
16
17
|
|
|
18
|
+
%a{pure}
|
|
17
19
|
def to_s: -> untyped
|
|
18
20
|
end
|
|
19
21
|
end
|