Class: DiscordRDA::Webhook
- Inherits:
-
Entity
- Object
- Entity
- DiscordRDA::Webhook
show all
- Defined in:
- lib/discord_rda/entity/support.rb
Constant Summary
collapse
- TYPES =
{
incoming: 1,
channel_follower: 2,
application: 3
}.freeze
Instance Attribute Summary
Attributes inherited from Entity
#id
Instance Method Summary
collapse
Methods inherited from Entity
#==, attribute, #created_at, from_hash, #hash, #initialize, #inspect, #to_h, #to_json
Instance Method Details
#application? ⇒ Boolean
446
447
448
|
# File 'lib/discord_rda/entity/support.rb', line 446
def application?
type == 3
end
|
#channel_follower? ⇒ Boolean
442
443
444
|
# File 'lib/discord_rda/entity/support.rb', line 442
def channel_follower?
type == 2
end
|
#incoming? ⇒ Boolean
438
439
440
|
# File 'lib/discord_rda/entity/support.rb', line 438
def incoming?
type == 1
end
|
#source_channel ⇒ Object
434
435
436
|
# File 'lib/discord_rda/entity/support.rb', line 434
def source_channel
@raw_data['source_channel'] ? Channel.new(@raw_data['source_channel']) : nil
end
|
#source_guild ⇒ Object
430
431
432
|
# File 'lib/discord_rda/entity/support.rb', line 430
def source_guild
@raw_data['source_guild'] ? Guild.new(@raw_data['source_guild']) : nil
end
|
#user ⇒ Object
426
427
428
|
# File 'lib/discord_rda/entity/support.rb', line 426
def user
@raw_data['user'] ? User.new(@raw_data['user']) : nil
end
|