guild

package
v0.0.0-...-d49a382 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBan

func NewBan() Ban

func NewEmoji

func NewEmoji() discord.Emoji

func NewGuild

func NewGuild() Guild

func NewIcon

func NewIcon() GuildIcon

func NewMember

func NewMember() discord.GuildMember

func NewRole

func NewRole() Role

func NewWidget

func NewWidget() Widget

Types

type EmojiSlice

type EmojiSlice []discord.Emoji

func (EmojiSlice) IsNil

func (e EmojiSlice) IsNil() bool

func (EmojiSlice) IsValid

func (e EmojiSlice) IsValid() bool

func (EmojiSlice) JSONSize

func (e EmojiSlice) JSONSize() (size int)

func (EmojiSlice) MarshalJSON

func (e EmojiSlice) MarshalJSON() ([]byte, error)

func (EmojiSlice) MarshalJSONArray

func (e EmojiSlice) MarshalJSONArray(enc *gojay.Encoder)

func (*EmojiSlice) UnmarshalJSON

func (e *EmojiSlice) UnmarshalJSON(in []byte) error

func (*EmojiSlice) UnmarshalJSONArray

func (e *EmojiSlice) UnmarshalJSONArray(dec *gojay.Decoder) error

func (EmojiSlice) Validate

func (e EmojiSlice) Validate() error

type FeatureSlice

type FeatureSlice []discord.GuildFeature

func (FeatureSlice) IsNil

func (f FeatureSlice) IsNil() bool

func (FeatureSlice) IsValid

func (f FeatureSlice) IsValid() bool

func (FeatureSlice) JSONSize

func (f FeatureSlice) JSONSize() (size int)

func (FeatureSlice) MarshalJSON

func (f FeatureSlice) MarshalJSON() ([]byte, error)

func (FeatureSlice) MarshalJSONArray

func (f FeatureSlice) MarshalJSONArray(enc *gojay.Encoder)

func (*FeatureSlice) UnmarshalJSON

func (f *FeatureSlice) UnmarshalJSON(in []byte) error

func (*FeatureSlice) UnmarshalJSONArray

func (f *FeatureSlice) UnmarshalJSONArray(dec *gojay.Decoder) error

func (FeatureSlice) Validate

func (f FeatureSlice) Validate() error

type IconImpl

type IconImpl struct {
	Root ImageData
}

func (*IconImpl) AspectRatio

func (i *IconImpl) AspectRatio() lib.AspectRatio

func (*IconImpl) Close

func (i *IconImpl) Close() error

Close will attempt to close the input io.ReadSeeker instance if it also happens to be an instance of io.Closer.

If the input io.ReadSeeker is not also an instance of io.Closer, then this method will do nothing.

func (*IconImpl) Format

func (i *IconImpl) Format() ImageFormat

func (*IconImpl) Height

func (i *IconImpl) Height() uint16

func (*IconImpl) IsValid

func (i *IconImpl) IsValid() bool

func (*IconImpl) MarshalJSON

func (i *IconImpl) MarshalJSON() ([]byte, error)

func (*IconImpl) String

func (i *IconImpl) String() (string, error)

func (*IconImpl) UnmarshalJSON

func (i *IconImpl) UnmarshalJSON(in []byte) (err error)

UnmarshalJSON attempts to deserialize a string encoded image data value into the current Icon instance.

This method may return one of the following library errors:

image.ErrBadImageDataSize = The base64 encoded image data is too small to be a valid image, it may have been truncated by the source. See image.MinPossibleImageString.

image.ErrBadImageDataJsonType = The value passed to this method was not a string.

image.ErrBadImageDataFormat = The given image data string is corrupt or malformed and contains no divider between the prefix and the actual image data.

image.ErrBadImageFormat = The input image data string is not of a type recognized by this library. See image.ImageFormat for the list of allowed types.

image.ErrTypeMismatch = The image format declared in the image data string's prefix does not match the actual type of the base64 encoded image.

In addition to the above errors, this method may return errors from the standard library's `image` or `base64` packages, or any error returned from attempting to close the previous image data held by this GuildIcon instance.

func (*IconImpl) Validate

func (i *IconImpl) Validate() error

func (*IconImpl) Width

func (i *IconImpl) Width() uint16

type RoleSlice

type RoleSlice []Role

func (*RoleSlice) UnmarshalJSONArray

func (r *RoleSlice) UnmarshalJSONArray(dec *gojay.Decoder) error

Jump to

Keyboard shortcuts

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