Class: RubyCord::Guild::Webhook::Message

Inherits:
Message show all
Defined in:
lib/rubycord/guild/webhook/message.rb

Defined Under Namespace

Classes: Author

Instance Attribute Summary collapse

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

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

#==, #eql?, #inspect

Instance Attribute Details

#channel_idRubyCord::Snowflake (readonly)

Returns The ID of the channel.

Returns:



9
10
11
# File 'lib/rubycord/guild/webhook/message.rb', line 9

def channel_id
  @channel_id
end

#guild_idRubyCord::Snowflake (readonly)

Returns The ID of the guild.

Returns:



11
12
13
# File 'lib/rubycord/guild/webhook/message.rb', line 11

def guild_id
  @guild_id
end

Instance Method Details

#deleteAsync::Task<void>

Deletes the message.

Returns:

  • (Async::Task<void>)

    The task.



46
47
48
# File 'lib/rubycord/guild/webhook/message.rb', line 46

def delete
  Async { @webhook.delete_message(self).wait }
end

#editAsync::Task<void>

Note:

The arguments of this method are defaultly set to RubyCord::Unset. Specify value to set the value, if not don't specify or specify RubyCord::Unset.

Edits the message.

Parameters:

Returns:

  • (Async::Task<void>)

    The task.



36
37
38
# File 'lib/rubycord/guild/webhook/message.rb', line 36

def edit(...)
  Async { @webhook.edit_message(self, ...).wait }
end