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, Asset, Attachment, AuditLog, AuditLog::Entry, AuditLog::Entry::Change, AuditLog::Entry::Changes, AuditLog::Integration, Channel, Guild, Guild::Ban, Guild::VanityInvite, Guild::Widget, GuildTemplate, GuildTemplate::TemplateGuild, GuildTemplate::TemplateGuild::Channel, GuildTemplate::TemplateGuild::Role, Integration, Integration::Account, 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, Snowflake, 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
17
18
19
20
21
22
23
|
# File 'lib/discorb/common.rb', line 17
def ==(other)
if respond_to?(:id) && other.respond_to?(:id)
id == other.id
else
super
end
end
|
#eql?(other) -> Boolean
13
14
15
|
# File 'lib/discorb/common.rb', line 13
def eql?(other)
self == other
end
|
#hash -> Object
30
31
32
|
# File 'lib/discorb/common.rb', line 30
def hash
@id.hash
end
|