Class: LibDiscord::Sticker

Inherits:
Resource show all
Defined in:
lib/lib_discord/sticker.rb

Overview

Sticker Resource

Do not instantiate a Sticker directly. Instead request one from an instance of Client.

client = LibDiscord::Client.new("Bot auth.token")
s = client["sticker"]

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from LibDiscord::Resource

Instance Method Details

#create_guild_sticker(guild_id:, json:) ⇒ Response

Parameters:

Returns:

Raises:

See Also:



90
91
92
# File 'lib/lib_discord/sticker.rb', line 90

def create_guild_sticker(guild_id:, json:)
  send_request(:post, "/guilds/#{guild_id}/stickers", json:)
end

#delete_guild_sticker(guild_id:, sticker_id:) ⇒ Response

Parameters:

Returns:

Raises:

See Also:



128
129
130
# File 'lib/lib_discord/sticker.rb', line 128

def delete_guild_sticker(guild_id:, sticker_id:)
  send_request(:delete, "/guilds/#{guild_id}/stickers/#{sticker_id}")
end

#get_guild_sticker(guild_id:, sticker_id:) ⇒ Response

Parameters:

Returns:

Raises:

See Also:



73
74
75
# File 'lib/lib_discord/sticker.rb', line 73

def get_guild_sticker(guild_id:, sticker_id:)
  send_request(:get, "/guilds/#{guild_id}/stickers/#{sticker_id}")
end

#get_sticker(sticker_id:) ⇒ Response

Parameters:

Returns:

Raises:

See Also:



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

def get_sticker(sticker_id:)
  send_request(:get, "/stickers/#{sticker_id}")
end

#list_guild_stickers(guild_id:) ⇒ Response

Parameters:

Returns:

Raises:

See Also:



55
56
57
# File 'lib/lib_discord/sticker.rb', line 55

def list_guild_stickers(guild_id:)
  send_request(:get, "/guilds/#{guild_id}/stickers")
end

#list_sticker_packsResponse

Returns:

Raises:

See Also:



40
41
42
# File 'lib/lib_discord/sticker.rb', line 40

def list_sticker_packs
  send_request(:get, "/sticker-packs")
end

#modify_guild_sticker(guild_id:, sticker_id:, json:) ⇒ Response

Parameters:

Returns:

Raises:

See Also:



110
111
112
# File 'lib/lib_discord/sticker.rb', line 110

def modify_guild_sticker(guild_id:, sticker_id:, json:)
  send_request(:patch, "/guilds/#{guild_id}/stickers/#{sticker_id}", json:)
end