discorb 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build_version.yml +2 -2
  3. data/.rubocop.yml +12 -75
  4. data/Changelog.md +10 -0
  5. data/Rakefile +482 -454
  6. data/lib/discorb/allowed_mentions.rb +68 -72
  7. data/lib/discorb/app_command/command.rb +466 -398
  8. data/lib/discorb/app_command/common.rb +65 -25
  9. data/lib/discorb/app_command/handler.rb +304 -266
  10. data/lib/discorb/app_command.rb +5 -5
  11. data/lib/discorb/application.rb +198 -197
  12. data/lib/discorb/asset.rb +101 -101
  13. data/lib/discorb/attachment.rb +134 -119
  14. data/lib/discorb/audit_logs.rb +412 -385
  15. data/lib/discorb/automod.rb +279 -269
  16. data/lib/discorb/channel/base.rb +107 -108
  17. data/lib/discorb/channel/category.rb +32 -32
  18. data/lib/discorb/channel/container.rb +44 -44
  19. data/lib/discorb/channel/dm.rb +26 -28
  20. data/lib/discorb/channel/guild.rb +311 -246
  21. data/lib/discorb/channel/stage.rb +156 -140
  22. data/lib/discorb/channel/text.rb +430 -336
  23. data/lib/discorb/channel/thread.rb +374 -325
  24. data/lib/discorb/channel/voice.rb +85 -79
  25. data/lib/discorb/channel.rb +5 -5
  26. data/lib/discorb/client.rb +635 -621
  27. data/lib/discorb/color.rb +178 -182
  28. data/lib/discorb/common.rb +168 -164
  29. data/lib/discorb/components/button.rb +107 -106
  30. data/lib/discorb/components/select_menu.rb +157 -145
  31. data/lib/discorb/components/text_input.rb +103 -106
  32. data/lib/discorb/components.rb +68 -66
  33. data/lib/discorb/dictionary.rb +135 -135
  34. data/lib/discorb/embed.rb +404 -398
  35. data/lib/discorb/emoji.rb +309 -302
  36. data/lib/discorb/emoji_table.rb +16099 -8857
  37. data/lib/discorb/error.rb +131 -131
  38. data/lib/discorb/event.rb +360 -314
  39. data/lib/discorb/event_handler.rb +39 -39
  40. data/lib/discorb/exe/about.rb +17 -17
  41. data/lib/discorb/exe/irb.rb +72 -67
  42. data/lib/discorb/exe/new.rb +323 -315
  43. data/lib/discorb/exe/run.rb +69 -68
  44. data/lib/discorb/exe/setup.rb +57 -55
  45. data/lib/discorb/exe/show.rb +12 -12
  46. data/lib/discorb/extend.rb +25 -45
  47. data/lib/discorb/extension.rb +89 -83
  48. data/lib/discorb/flag.rb +126 -128
  49. data/lib/discorb/gateway.rb +984 -804
  50. data/lib/discorb/gateway_events.rb +670 -638
  51. data/lib/discorb/gateway_requests.rb +45 -48
  52. data/lib/discorb/guild.rb +2115 -1626
  53. data/lib/discorb/guild_template.rb +280 -241
  54. data/lib/discorb/http.rb +247 -232
  55. data/lib/discorb/image.rb +42 -42
  56. data/lib/discorb/integration.rb +169 -161
  57. data/lib/discorb/intents.rb +161 -163
  58. data/lib/discorb/interaction/autocomplete.rb +76 -62
  59. data/lib/discorb/interaction/command.rb +279 -224
  60. data/lib/discorb/interaction/components.rb +114 -104
  61. data/lib/discorb/interaction/modal.rb +36 -32
  62. data/lib/discorb/interaction/response.rb +379 -336
  63. data/lib/discorb/interaction/root.rb +271 -257
  64. data/lib/discorb/interaction.rb +5 -5
  65. data/lib/discorb/invite.rb +154 -153
  66. data/lib/discorb/member.rb +344 -311
  67. data/lib/discorb/message.rb +615 -544
  68. data/lib/discorb/message_meta.rb +197 -186
  69. data/lib/discorb/modules.rb +371 -290
  70. data/lib/discorb/permission.rb +305 -291
  71. data/lib/discorb/presence.rb +352 -346
  72. data/lib/discorb/rate_limit.rb +81 -76
  73. data/lib/discorb/reaction.rb +55 -54
  74. data/lib/discorb/role.rb +272 -240
  75. data/lib/discorb/shard.rb +76 -74
  76. data/lib/discorb/sticker.rb +193 -171
  77. data/lib/discorb/user.rb +205 -188
  78. data/lib/discorb/utils/colored_puts.rb +16 -16
  79. data/lib/discorb/utils.rb +12 -16
  80. data/lib/discorb/voice_state.rb +305 -281
  81. data/lib/discorb/webhook.rb +537 -507
  82. data/lib/discorb.rb +62 -56
  83. data/sig/discorb/application.rbs +2 -0
  84. data/sig/discorb/automod.rbs +10 -1
  85. data/sig/discorb/guild.rbs +2 -0
  86. data/sig/discorb/message.rbs +2 -0
  87. data/sig/discorb/user.rbs +22 -20
  88. metadata +2 -2
@@ -1,197 +1,198 @@
1
- # frozen_string_literal: true
2
-
3
- module Discorb
4
- #
5
- # Represents a Discord application.
6
- #
7
- class Application < DiscordModel
8
- # @return [Discorb::Snowflake] The application's ID.
9
- attr_reader :id
10
- # @return [String] The application's name.
11
- attr_reader :name
12
- # @return [Discorb::Asset] The application's icon.
13
- attr_reader :icon
14
- # @return [String] The application's description.
15
- attr_reader :description
16
- # @return [String] The application's summary.
17
- attr_reader :summary
18
- # @return [String] The application's public key.
19
- attr_reader :verify_key
20
- # @return [Discorb::User] The application's owner.
21
- attr_reader :owner
22
- # @return [Discorb::Application::Team] The application's team.
23
- attr_reader :team
24
- # @return [Boolean] Whether the application's bot is public.
25
- attr_reader :bot_public
26
- alias bot_public? bot_public
27
- # @return [Boolean] Whether the application's bot requires a code grant.
28
- attr_reader :bot_require_code_grant
29
- alias bot_require_code_grant? bot_require_code_grant
30
- # @return [Discorb::Application::Flag] The application's flags.
31
- attr_reader :flags
32
-
33
- #
34
- # Initializes a new instance of the Application class.
35
- # @private
36
- #
37
- # @param [Discorb::Client] client The client that instantiated the object.
38
- # @param [Hash] data The data of the object.
39
- #
40
- def initialize(client, data)
41
- @client = client
42
- @data = data
43
- @id = Snowflake.new(data[:id])
44
- @name = data[:name]
45
- @icon = Asset.new(self, data[:icon])
46
- @description = data[:description]
47
- @summary = data[:summary]
48
- @bot_public = data[:bot_public]
49
- @bot_require_code_grant = data[:bot_require_code_grant]
50
- @verify_key = data[:verify_key]
51
- @owner = @client.users[data[:owner][:id]] || User.new(@client, data[:owner])
52
- @team = data[:team] && Team.new(@client, data[:team])
53
- @flags = Flag.new(data[:flags])
54
- end
55
-
56
- def inspect
57
- "#<#{self.class} id=#{@id}>"
58
- end
59
-
60
- alias public? bot_public?
61
-
62
- alias require_code_grant? bot_require_code_grant?
63
-
64
- #
65
- # Represents a flag for an application.
66
- # ## Flag fields
67
- #
68
- # | Field|Value|
69
- # |---|---|
70
- # | `1 << 12` | `:gateway_presence` |
71
- # | `1 << 13` | `:gateway_presence_limited` |
72
- # | `1 << 14` | `:gateway_guild_members` |
73
- # | `1 << 15` | `:gateway_guild_members_limited` |
74
- # | `1 << 16` | `:verification_pending_guild_limit` |
75
- # | `1 << 17` | `:embedded` |
76
- # | `1 << 18` | `:gateway_message_content` |
77
- # | `1 << 19` | `:gateway_message_content_limited` |
78
- #
79
- class Flag < Discorb::Flag
80
- @bits = {
81
- gateway_presence: 12,
82
- gateway_presence_limited: 13,
83
- gateway_guild_members: 14,
84
- gateway_guild_members_limited: 15,
85
- verification_pending_guild_limit: 16,
86
- embedded: 17,
87
- gateway_message_content: 18,
88
- gateway_message_content_limited: 19,
89
- }
90
- end
91
-
92
- #
93
- # Represents a team for an application.
94
- #
95
- class Team < DiscordModel
96
- # @return [Discorb::Snowflake] The team's ID.
97
- attr_reader :id
98
- # @return [Discorb::Asset] The team's icon.
99
- attr_reader :icon
100
- # @return [String] The team's name.
101
- attr_reader :name
102
- # @return [Discorb::Snowflake] The team's owner's ID.
103
- attr_reader :owner_user_id
104
- # @return [Discorb::Application::Team::Member] The team's member.
105
- attr_reader :members
106
-
107
- #
108
- # Initializes a new instance of the Team class.
109
- # @private
110
- #
111
- # @param [Discorb::Client] client The client that instantiated the object.
112
- # @param [Hash] data The data of the object.
113
- #
114
- def initialize(client, data)
115
- @client = client
116
- @id = Snowflake.new(data[:id])
117
- @icon = Asset.new(self, data[:icon])
118
- @name = data[:name]
119
- @owner_user_id = data[:owner_user_id]
120
- @members = data[:members].map { |m| Team::Member.new(@client, self, m) }
121
- end
122
-
123
- #
124
- # The team's owner.
125
- #
126
- # @return [Discorb::Application::Team::Member] The team's owner.
127
- #
128
- def owner
129
- @members.find { |m| m.user.id == @owner_user_id }
130
- end
131
-
132
- def inspect
133
- "#<#{self.class} id=#{@id}>"
134
- end
135
-
136
- #
137
- # Represents a member of team.
138
- #
139
- class Member < DiscordModel
140
- # @return [Discorb::User] The user.
141
- attr_reader :user
142
- # @return [Snowflake] The ID of member's team.
143
- attr_reader :team_id
144
- # @return [:invited, :accepted] The member's membership state.
145
- attr_reader :membership_state
146
- alias state membership_state
147
- # @return [Array<Symbol>] The permissions of the member.
148
- # @note This always return `:*`.
149
- attr_reader :permissions
150
-
151
- # @!attribute [r] pending?
152
- # @return [Boolean] Whether the member is not joined to the team.
153
- # @!attribute [r] accepted?
154
- # @return [Boolean] Whether the member accepted joining the team.
155
- # @!attribute [r] owner?
156
- # @return [Boolean] Whether the member is the team's owner.
157
-
158
- # @private
159
- # @return [{Integer => Symbol}] The permission map.
160
- MEMBERSHIP_STATE = {
161
- 1 => :invited,
162
- 2 => :accepted,
163
- }.freeze
164
-
165
- def initialize(client, team, data)
166
- @client = client
167
- @data = data
168
- @team = team
169
- @user = client.users[data[:user][:id]] || User.new(client, data[:user])
170
- @team_id = Snowflake.new(data[:team_id])
171
- @membership_state = MEMBERSHIP_STATE[data[:membership_state]]
172
- @permissions = data[:permissions].map(&:to_sym)
173
- end
174
-
175
- def pending?
176
- @membership_state == :invited
177
- end
178
-
179
- def accepted?
180
- @membership_state == :accepted
181
- end
182
-
183
- def inspect
184
- "#<#{self.class} id=#{@user.id}>"
185
- end
186
-
187
- def owner?
188
- @team.owner_user_id == @user.id
189
- end
190
-
191
- def ==(other)
192
- super || @user == other
193
- end
194
- end
195
- end
196
- end
197
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Discorb
4
+ #
5
+ # Represents a Discord application.
6
+ #
7
+ class Application < DiscordModel
8
+ # @return [Discorb::Snowflake] The application's ID.
9
+ attr_reader :id
10
+ # @return [String] The application's name.
11
+ attr_reader :name
12
+ # @return [Discorb::Asset] The application's icon.
13
+ attr_reader :icon
14
+ # @return [String] The application's description.
15
+ attr_reader :description
16
+ # @return [String] The application's summary.
17
+ attr_reader :summary
18
+ # @return [String] The application's public key.
19
+ attr_reader :verify_key
20
+ # @return [Discorb::User] The application's owner.
21
+ attr_reader :owner
22
+ # @return [Discorb::Application::Team] The application's team.
23
+ attr_reader :team
24
+ # @return [Boolean] Whether the application's bot is public.
25
+ attr_reader :bot_public
26
+ alias bot_public? bot_public
27
+ # @return [Boolean] Whether the application's bot requires a code grant.
28
+ attr_reader :bot_require_code_grant
29
+ alias bot_require_code_grant? bot_require_code_grant
30
+ # @return [Discorb::Application::Flag] The application's flags.
31
+ attr_reader :flags
32
+
33
+ #
34
+ # Initializes a new instance of the Application class.
35
+ # @private
36
+ #
37
+ # @param [Discorb::Client] client The client that instantiated the object.
38
+ # @param [Hash] data The data of the object.
39
+ #
40
+ def initialize(client, data)
41
+ @client = client
42
+ @data = data
43
+ @id = Snowflake.new(data[:id])
44
+ @name = data[:name]
45
+ @icon = Asset.new(self, data[:icon])
46
+ @description = data[:description]
47
+ @summary = data[:summary]
48
+ @bot_public = data[:bot_public]
49
+ @bot_require_code_grant = data[:bot_require_code_grant]
50
+ @verify_key = data[:verify_key]
51
+ @owner =
52
+ @client.users[data[:owner][:id]] || User.new(@client, data[:owner])
53
+ @team = data[:team] && Team.new(@client, data[:team])
54
+ @flags = Flag.new(data[:flags])
55
+ end
56
+
57
+ def inspect
58
+ "#<#{self.class} id=#{@id}>"
59
+ end
60
+
61
+ alias public? bot_public?
62
+
63
+ alias require_code_grant? bot_require_code_grant?
64
+
65
+ #
66
+ # Represents a flag for an application.
67
+ # ## Flag fields
68
+ #
69
+ # | Field|Value|
70
+ # |---|---|
71
+ # | `1 << 12` | `:gateway_presence` |
72
+ # | `1 << 13` | `:gateway_presence_limited` |
73
+ # | `1 << 14` | `:gateway_guild_members` |
74
+ # | `1 << 15` | `:gateway_guild_members_limited` |
75
+ # | `1 << 16` | `:verification_pending_guild_limit` |
76
+ # | `1 << 17` | `:embedded` |
77
+ # | `1 << 18` | `:gateway_message_content` |
78
+ # | `1 << 19` | `:gateway_message_content_limited` |
79
+ # | `1 << 23` | `:application_command_badge` |
80
+ #
81
+ class Flag < Discorb::Flag
82
+ @bits = {
83
+ gateway_presence: 12,
84
+ gateway_presence_limited: 13,
85
+ gateway_guild_members: 14,
86
+ gateway_guild_members_limited: 15,
87
+ verification_pending_guild_limit: 16,
88
+ embedded: 17,
89
+ gateway_message_content: 18,
90
+ gateway_message_content_limited: 19,
91
+ application_command_badge: 23
92
+ }
93
+ end
94
+
95
+ #
96
+ # Represents a team for an application.
97
+ #
98
+ class Team < DiscordModel
99
+ # @return [Discorb::Snowflake] The team's ID.
100
+ attr_reader :id
101
+ # @return [Discorb::Asset] The team's icon.
102
+ attr_reader :icon
103
+ # @return [String] The team's name.
104
+ attr_reader :name
105
+ # @return [Discorb::Snowflake] The team's owner's ID.
106
+ attr_reader :owner_user_id
107
+ # @return [Discorb::Application::Team::Member] The team's member.
108
+ attr_reader :members
109
+
110
+ #
111
+ # Initializes a new instance of the Team class.
112
+ # @private
113
+ #
114
+ # @param [Discorb::Client] client The client that instantiated the object.
115
+ # @param [Hash] data The data of the object.
116
+ #
117
+ def initialize(client, data)
118
+ @client = client
119
+ @id = Snowflake.new(data[:id])
120
+ @icon = Asset.new(self, data[:icon])
121
+ @name = data[:name]
122
+ @owner_user_id = data[:owner_user_id]
123
+ @members = data[:members].map { |m| Team::Member.new(@client, self, m) }
124
+ end
125
+
126
+ #
127
+ # The team's owner.
128
+ #
129
+ # @return [Discorb::Application::Team::Member] The team's owner.
130
+ #
131
+ def owner
132
+ @members.find { |m| m.user.id == @owner_user_id }
133
+ end
134
+
135
+ def inspect
136
+ "#<#{self.class} id=#{@id}>"
137
+ end
138
+
139
+ #
140
+ # Represents a member of team.
141
+ #
142
+ class Member < DiscordModel
143
+ # @return [Discorb::User] The user.
144
+ attr_reader :user
145
+ # @return [Snowflake] The ID of member's team.
146
+ attr_reader :team_id
147
+ # @return [:invited, :accepted] The member's membership state.
148
+ attr_reader :membership_state
149
+ alias state membership_state
150
+ # @return [Array<Symbol>] The permissions of the member.
151
+ # @note This always return `:*`.
152
+ attr_reader :permissions
153
+
154
+ # @!attribute [r] pending?
155
+ # @return [Boolean] Whether the member is not joined to the team.
156
+ # @!attribute [r] accepted?
157
+ # @return [Boolean] Whether the member accepted joining the team.
158
+ # @!attribute [r] owner?
159
+ # @return [Boolean] Whether the member is the team's owner.
160
+
161
+ # @private
162
+ # @return [{Integer => Symbol}] The permission map.
163
+ MEMBERSHIP_STATE = { 1 => :invited, 2 => :accepted }.freeze
164
+
165
+ def initialize(client, team, data)
166
+ @client = client
167
+ @data = data
168
+ @team = team
169
+ @user =
170
+ client.users[data[:user][:id]] || User.new(client, data[:user])
171
+ @team_id = Snowflake.new(data[:team_id])
172
+ @membership_state = MEMBERSHIP_STATE[data[:membership_state]]
173
+ @permissions = data[:permissions].map(&:to_sym)
174
+ end
175
+
176
+ def pending?
177
+ @membership_state == :invited
178
+ end
179
+
180
+ def accepted?
181
+ @membership_state == :accepted
182
+ end
183
+
184
+ def inspect
185
+ "#<#{self.class} id=#{@user.id}>"
186
+ end
187
+
188
+ def owner?
189
+ @team.owner_user_id == @user.id
190
+ end
191
+
192
+ def ==(other)
193
+ super || @user == other
194
+ end
195
+ end
196
+ end
197
+ end
198
+ end
data/lib/discorb/asset.rb CHANGED
@@ -1,101 +1,101 @@
1
- # frozen_string_literal: true
2
-
3
- module Discorb
4
- #
5
- # Represents a single asset.
6
- #
7
- class Asset < DiscordModel
8
- # @return [String] The hash of asset.
9
- attr_reader :hash
10
-
11
- # @!attribute [r] animated?
12
- # @return [Boolean] Whether the asset is animated.
13
-
14
- #
15
- # Initialize a new instance of the Asset class.
16
- # @private
17
- #
18
- # @param [Discorb::Client] client The client that instantiated the object.
19
- # @param [Hash] data The data of the object.
20
- #
21
- def initialize(target, hash, path: nil)
22
- @hash = hash
23
- @target = target
24
- @path = path
25
- end
26
-
27
- def animated?
28
- @hash.start_with? "a_"
29
- end
30
-
31
- #
32
- # URL of the asset.
33
- #
34
- # @param [String] image_format The image format.
35
- # @param [Integer] size The size of the image.
36
- #
37
- # @return [String] URL of the asset.
38
- #
39
- def url(image_format: nil, size: 1024)
40
- path = @path || "#{endpoint}/#{@target.id}"
41
- "https://cdn.discordapp.com/#{path}/#{@hash}.#{image_format or (animated? ? "gif" : "webp")}?size=#{size}"
42
- end
43
-
44
- def inspect
45
- "#<#{self.class} #{@target.class} #{@hash}>"
46
- end
47
-
48
- private
49
-
50
- def endpoint
51
- case @target
52
- when User, Member, Webhook
53
- "avatars"
54
- when Guild, Webhook::FollowerWebhook::Guild
55
- "icons"
56
- when Application, Integration::Application
57
- "app-icons"
58
- when Application::Team
59
- "team-icons"
60
- end
61
- end
62
- end
63
-
64
- #
65
- # Represents a default avatar.
66
- #
67
- class DefaultAvatar < DiscordModel
68
- # @!attribute [r] animated?
69
- # @return [false] For compatibility with {Asset}, always `false`.
70
-
71
- #
72
- # Initialize a new instance of the DefaultAvatar class.
73
- # @private
74
- #
75
- def initialize(discriminator)
76
- @discriminator = discriminator.to_s.rjust(4, "0")
77
- end
78
-
79
- def animated?
80
- false
81
- end
82
-
83
- #
84
- # Returns the URL of the avatar.
85
- #
86
- # @param [String] image_format The image format. This is compatible with {Asset#url}, will be ignored.
87
- # @param [Integer] size The size of the image. This is compatible with {Asset#url}, will be ignored.
88
- #
89
- # @return [String] URL of the avatar.
90
- #
91
- # rubocop: disable Lint/UnusedMethodArgument
92
- def url(image_format: nil, size: 1024)
93
- # rubocop: enable Lint/UnusedMethodArgument
94
- "https://cdn.discordapp.com/embed/avatars/#{@discriminator.to_i % 5}.png"
95
- end
96
-
97
- def inspect
98
- "#<#{self.class} #{@discriminator}>"
99
- end
100
- end
101
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Discorb
4
+ #
5
+ # Represents a single asset.
6
+ #
7
+ class Asset < DiscordModel
8
+ # @return [String] The hash of asset.
9
+ attr_reader :hash
10
+
11
+ # @!attribute [r] animated?
12
+ # @return [Boolean] Whether the asset is animated.
13
+
14
+ #
15
+ # Initialize a new instance of the Asset class.
16
+ # @private
17
+ #
18
+ # @param [Discorb::Client] client The client that instantiated the object.
19
+ # @param [Hash] data The data of the object.
20
+ #
21
+ def initialize(target, hash, path: nil)
22
+ @hash = hash
23
+ @target = target
24
+ @path = path
25
+ end
26
+
27
+ def animated?
28
+ @hash.start_with? "a_"
29
+ end
30
+
31
+ #
32
+ # URL of the asset.
33
+ #
34
+ # @param [String] image_format The image format.
35
+ # @param [Integer] size The size of the image.
36
+ #
37
+ # @return [String] URL of the asset.
38
+ #
39
+ def url(image_format: nil, size: 1024)
40
+ path = @path || "#{endpoint}/#{@target.id}"
41
+ "https://cdn.discordapp.com/#{path}/#{@hash}.#{image_format or (animated? ? "gif" : "webp")}?size=#{size}"
42
+ end
43
+
44
+ def inspect
45
+ "#<#{self.class} #{@target.class} #{@hash}>"
46
+ end
47
+
48
+ private
49
+
50
+ def endpoint
51
+ case @target
52
+ when User, Member, Webhook
53
+ "avatars"
54
+ when Guild, Webhook::FollowerWebhook::Guild
55
+ "icons"
56
+ when Application, Integration::Application
57
+ "app-icons"
58
+ when Application::Team
59
+ "team-icons"
60
+ end
61
+ end
62
+ end
63
+
64
+ #
65
+ # Represents a default avatar.
66
+ #
67
+ class DefaultAvatar < DiscordModel
68
+ # @!attribute [r] animated?
69
+ # @return [false] For compatibility with {Asset}, always `false`.
70
+
71
+ #
72
+ # Initialize a new instance of the DefaultAvatar class.
73
+ # @private
74
+ #
75
+ def initialize(discriminator)
76
+ @discriminator = discriminator.to_s.rjust(4, "0")
77
+ end
78
+
79
+ def animated?
80
+ false
81
+ end
82
+
83
+ #
84
+ # Returns the URL of the avatar.
85
+ #
86
+ # @param [String] image_format The image format. This is compatible with {Asset#url}, will be ignored.
87
+ # @param [Integer] size The size of the image. This is compatible with {Asset#url}, will be ignored.
88
+ #
89
+ # @return [String] URL of the avatar.
90
+ #
91
+ # rubocop: disable Lint/UnusedMethodArgument
92
+ def url(image_format: nil, size: 1024)
93
+ # rubocop: enable Lint/UnusedMethodArgument
94
+ "https://cdn.discordapp.com/embed/avatars/#{@discriminator.to_i % 5}.png"
95
+ end
96
+
97
+ def inspect
98
+ "#<#{self.class} #{@discriminator}>"
99
+ end
100
+ end
101
+ end