Class: Discorb::Sticker

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

Overview

Represents a sticker.

Direct Known Subclasses

GuildSticker

Defined Under Namespace

Classes: GuildSticker, Pack

Instance Attribute Summary collapse

Method Summary

Methods inherited from DiscordModel

#==, #eql?, #inspect

Instance Attribute Details

#availableBoolean (readonly) Also known as: available?

Returns Whether the sticker is available.

Returns:

  • (Boolean)

    Whether the sticker is available.



29
30
31
# File 'lib/discorb/sticker.rb', line 29

def available
  @available
end

#descriptionString (readonly)

Returns The URL of the sticker.

Returns:

  • (String)

    The URL of the sticker.



19
20
21
# File 'lib/discorb/sticker.rb', line 19

def description
  @description
end

#format:png, ... (readonly)

Returns The format of the sticker.

Returns:

  • (:png, :apng, :lottie)

    The format of the sticker.



17
18
19
# File 'lib/discorb/sticker.rb', line 17

def format
  @format
end

#guild_idDiscorb::Snowflake (readonly)

Returns The ID of the guild the sticker is in.

Returns:



25
26
27
# File 'lib/discorb/sticker.rb', line 25

def guild_id
  @guild_id
end

#idDiscorb::Snowflake (readonly)

Returns The ID of the sticker.

Returns:



9
10
11
# File 'lib/discorb/sticker.rb', line 9

def id
  @id
end

#nameString (readonly)

Returns The name of the sticker.

Returns:

  • (String)

    The name of the sticker.



11
12
13
# File 'lib/discorb/sticker.rb', line 11

def name
  @name
end

#pack_idDiscorb::Snowflake (readonly)

Returns The ID of the sticker pack.

Returns:



21
22
23
# File 'lib/discorb/sticker.rb', line 21

def pack_id
  @pack_id
end

#sort_valueInteger (readonly)

Returns The sort value of the sticker.

Returns:

  • (Integer)

    The sort value of the sticker.



23
24
25
# File 'lib/discorb/sticker.rb', line 23

def sort_value
  @sort_value
end

#tagsArray<String> (readonly)

Returns The tags of the sticker.

Returns:

  • (Array<String>)

    The tags of the sticker.



13
14
15
# File 'lib/discorb/sticker.rb', line 13

def tags
  @tags
end

#type:official, :guild (readonly)

Returns The type of sticker.

Returns:

  • (:official, :guild)

    The type of sticker.



15
16
17
# File 'lib/discorb/sticker.rb', line 15

def type
  @type
end

#userDiscorb::User (readonly)

Returns The user who created the sticker.

Returns:



27
28
29
# File 'lib/discorb/sticker.rb', line 27

def user
  @user
end