Class: Discorb::Webhook::Message
- Inherits:
-
Message
- Object
- DiscordModel
- Message
- Discorb::Webhook::Message
- Defined in:
- lib/discorb/webhook.rb
Overview
Represents a webhook message.
Defined Under Namespace
Classes: Author
Instance Attribute Summary collapse
-
#channel_id ⇒ Discorb::Snowflake
readonly
The ID of the channel.
-
#guild_id ⇒ Discorb::Snowflake
readonly
The ID of the guild.
Attributes inherited from Message
#activity, #application_id, #attachments, #author, #channel, #components, #content, #created_at, #deleted, #dm?, #edited?, #embed, #embed?, #embeds, #flag, #guild, #guild?, #id, #interaction, #jump_url, #mention_everyone, #message_reference, #pinned, #reactions, #reply?, #stickers, #thread, #tts, #type, #updated_at, #webhook?, #webhook_id
Instance Method Summary collapse
-
#delete ⇒ Async::Task<void>
Deletes the message.
-
#edit ⇒ Async::Task<void>
Edits the message.
Methods inherited from Message
#add_reaction, #clean_content, #fetch_reacted_users, #inspect, #pin, #publish, #remove_reaction, #remove_reaction_of, #reply, #start_thread, #to_reference, #unpin
Methods inherited from DiscordModel
Instance Attribute Details
#channel_id ⇒ Discorb::Snowflake (readonly)
Returns The ID of the channel.
374 375 376 |
# File 'lib/discorb/webhook.rb', line 374 def channel_id @channel_id end |
#guild_id ⇒ Discorb::Snowflake (readonly)
Returns The ID of the guild.
376 377 378 |
# File 'lib/discorb/webhook.rb', line 376 def guild_id @guild_id end |
Instance Method Details
#delete ⇒ Async::Task<void>
Deletes the message.
411 412 413 |
# File 'lib/discorb/webhook.rb', line 411 def delete Async { @webhook.(self).wait } end |
#edit ⇒ Async::Task<void>
The arguments of this method are defaultly set to Discorb::Unset
.
Specify value to set the value, if not don't specify or specify Discorb::Unset
.
Edits the message.
401 402 403 |
# File 'lib/discorb/webhook.rb', line 401 def edit(...) Async { @webhook.(self, ...).wait } end |