Class: Discorb::Webhook::Message::Author

Inherits:
DiscordModel show all
Defined in:
lib/discorb/webhook.rb

Overview

Represents an author of webhook message.

Instance Attribute Summary collapse

Method Summary

Methods inherited from DiscordModel

#==, #eql?, #hash

Instance Attribute Details

#avatar -> Discorb::Asset (readonly)

Returns The avatar of the author.

Returns:



372
373
374
# File 'lib/discorb/webhook.rb', line 372

def avatar
  @avatar
end

#bot -> Boolean (readonly) Also known as: bot?

Note:

This will be always true.

Returns Whether the author is a bot.

Returns:

  • (Boolean)

    Whether the author is a bot.



364
365
366
# File 'lib/discorb/webhook.rb', line 364

def bot
  @bot
end

#discriminator -> String (readonly)

Returns The discriminator of the author.

Returns:

  • (String)

    The discriminator of the author.



374
375
376
# File 'lib/discorb/webhook.rb', line 374

def discriminator
  @discriminator
end

#id -> Discorb::Snowflake (readonly)

Returns The ID of the author.

Returns:



367
368
369
# File 'lib/discorb/webhook.rb', line 367

def id
  @id
end

#username -> String (readonly) Also known as: name

Returns The name of the author.

Returns:

  • (String)

    The name of the author.



369
370
371
# File 'lib/discorb/webhook.rb', line 369

def username
  @username
end