emoji

package
v0.0.0-...-02b306f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateForGuild

func CreateForGuild(token auth.Token, guildID snowflake.Snowflake, params ...CreateParams) (emoji emoji.Emoji, err error)

CreateForGuild creates a new emoji for the guild with the given id.

func DeleteFromGuild

func DeleteFromGuild(token auth.Token, guildID, emojiID snowflake.Snowflake) error

DeleteFromGuild deletes the emoji with the given id from the guild with the given id.

func GetAllForGuild

func GetAllForGuild(token auth.Token, guildID snowflake.Snowflake) (emoji []emoji.Emoji, err error)

GetAllForGuild retrieves all emoji for the guild with the given ID.

func GetForGuild

func GetForGuild(token auth.Token, guildID, emojiID snowflake.Snowflake) (emoji emoji.Emoji, err error)

GetForGuild retrieves the emoji with the given id from the guild with the given id.

func ModifyInGuild

func ModifyInGuild(token auth.Token, guildID snowflake.Snowflake, emojiID snowflake.Snowflake, params ...ModifyParams) (emoji emoji.Emoji, err error)

ModifyInGuild modifies the emoji with the given id in the guild with the given id. It returns the updated emoji.

Types

type CreateParams

type CreateParams struct {
	// Name is the name of the emoji.
	Name string `json:"name,omitempty"`

	// Image contains the image data for the emoji.
	Image []byte `json:"image,omitempty"`

	// Roles is the set of roles allowed to use the emoji.
	Roles []snowflake.Snowflake `json:"roles,omitempty"`
}

type ModifyParams

type ModifyParams struct {
	// Name is the name of the emoji to modify.
	Name string `json:"name,omitempty"`

	// Roles is the set of roles allowed to use the emoji.
	Roles *[]snowflake.Snowflake `json:"roles,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL