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