Class: Discorb::DiscordModel
Abstract
- Inherits:
-
Object
- Object
- Discorb::DiscordModel
show all
- Defined in:
- lib/discorb/common.rb
Overview
Represents Discord model.
Direct Known Subclasses
Application, Application::Team, Application::Team::Member, ApplicationCommand::Command, Asset, AuditLog, AuditLog::Entry, AuditLog::Entry::Change, AuditLog::Entry::Changes, AuditLog::Integration, AutoModRule, AutoModRule::Action, Channel, DefaultAvatar, Guild, Guild::Ban, Guild::VanityInvite, Guild::Widget, GuildTemplate, GuildTemplate::TemplateGuild, GuildTemplate::TemplateGuild::Channel, GuildTemplate::TemplateGuild::Role, Integration, Integration::Account, Integration::Application, Interaction, Invite, Message, Message::Activity, Message::Interaction, PartialEmoji, Presence, Presence::Activity, Presence::Activity::Asset, Presence::Activity::Button, Presence::Activity::Party, Presence::Activity::Secrets, Presence::Activity::Timestamps, Presence::ClientStatus, Reaction, Role, Role::Tag, ScheduledEvent, StageInstance, Sticker, Sticker::Pack, ThreadChannel::Member, User, VoiceRegion, VoiceState, Webhook::FollowerWebhook::Channel, Webhook::FollowerWebhook::Guild, Webhook::Message::Author, WelcomeScreen, WelcomeScreen::Channel
Instance Method Summary
collapse
Instance Method Details
#==(other) -> Object
22
23
24
25
26
27
28
|
# File 'lib/discorb/common.rb', line 22
def ==(other)
if respond_to?(:id) && other.respond_to?(:id)
id == other.id
else
super
end
end
|
#eql?(other) -> Boolean
18
19
20
|
# File 'lib/discorb/common.rb', line 18
def eql?(other)
self == other
end
|
#inspect -> Object
30
31
32
|
# File 'lib/discorb/common.rb', line 30
def inspect
"#<#{self.class}: #{@id}>"
end
|