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, ForumChannel::Tag, 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
23
24
25
26
27
28
29
|
# File 'lib/discorb/common.rb', line 23
def ==(other)
if respond_to?(:id) && other.respond_to?(:id)
id == other.id
else
super
end
end
|
#eql?(other) -> Boolean
19
20
21
|
# File 'lib/discorb/common.rb', line 19
def eql?(other)
self == other
end
|
#inspect -> Object
31
32
33
|
# File 'lib/discorb/common.rb', line 31
def inspect
"#<#{self.class}: #{@id}>"
end
|