Versions in this module Expand all Collapse all v20 v20.0.0 Oct 22, 2021 Changes in this version + var ErrResponse = errors.New("error response") + type AttachmentResponse struct + Filename string + Height int + ID string + IDSnowflake snowflake.Snowflake + ProxyURL string + Size int + URL string + Width int + func (ar *AttachmentResponse) Snowflakify() error + type ChannelMentionResponse struct + GuildID string + GuildIDSnowflake snowflake.Snowflake + ID string + IDSnowflake snowflake.Snowflake + Name string + Type int + func (cmr *ChannelMentionResponse) Snowflakify() error + type DiscordJSONClient struct + func NewDiscordJSONClient(deps dependencies, apiURL string) *DiscordJSONClient + func (d *DiscordJSONClient) CreateReaction(ctx context.Context, cid, mid snowflake.Snowflake, emoji string) (resp *http.Response, err error) + func (d *DiscordJSONClient) GetGateway(ctx context.Context) (GatewayResponse, error) + func (d *DiscordJSONClient) GetGuildMember(ctx context.Context, gid, uid snowflake.Snowflake) (respData GuildMemberResponse, err error) + func (d *DiscordJSONClient) GetMessage(ctx context.Context, cid, mid snowflake.Snowflake) (respData MessageResponse, err error) + func (d *DiscordJSONClient) SendMessage(ctx context.Context, cid snowflake.Snowflake, m marshaler) (respData MessageResponse, err error) + func (d *DiscordJSONClient) SetDebug(val bool) + type Embed struct + Color int + Description string + Fields []EmbedField + Footer EmbedFooter + Timestamp string + Title string + URL string + type EmbedAuthorResponse struct + IconURL string + Name string + ProxyIconURL string + URL string + type EmbedField struct + Inline bool + Name string + Value string + type EmbedFieldResponse struct + Inline bool + Name string + Value string + type EmbedFooter struct + Text string + type EmbedFooterResponse struct + IconURL string + ProxyIconURL string + Text string + type EmbedImageResponse struct + Height int + ProxyURL string + URL string + Width int + type EmbedProviderResponse struct + Name string + URL string + type EmbedResponse struct + Author EmbedAuthorResponse + Color int + Description string + Fields []EmbedFieldResponse + Footer EmbedFooterResponse + Image EmbedImageResponse + Provider EmbedProviderResponse + Thumbnail EmbedImageResponse + Timestamp string + Title string + Type string + URL string + Video EmbedImageResponse + type EmojiResponse struct + Animated bool + Available bool + ID string + IDSnowflake snowflake.Snowflake + Managed bool + Name string + RequireColons bool + Roles []RoleResponse + User UserResponse + func (er *EmojiResponse) Snowflakify() error + type GatewayResponse struct + Shards int + URL string + type GuildMemberResponse struct + Deaf bool + JoinedAt string + Mute bool + Nick string + PremiumSince string + RoleSnowflakes []snowflake.Snowflake + Roles []string + User *UserResponse + func (gmr *GuildMemberResponse) Snowflakify() error + func (gmr GuildMemberResponse) HasRole(rid snowflake.Snowflake) bool + type HTTPClient interface + Get func(context.Context, string, *http.Header) (*http.Response, error) + GetBody func(context.Context, string, *http.Header) (*http.Response, []byte, error) + GetJSON func(context.Context, string, *http.Header, interface{}) (*http.Response, error) + Post func(context.Context, string, *http.Header, io.Reader) (*http.Response, error) + PostBody func(context.Context, string, *http.Header, io.Reader) (*http.Response, []byte, error) + PostJSON func(context.Context, string, *http.Header, io.Reader, interface{}) (*http.Response, error) + Put func(context.Context, string, *http.Header, io.Reader) (*http.Response, error) + PutBody func(context.Context, string, *http.Header, io.Reader) (*http.Response, []byte, error) + PutJSON func(context.Context, string, *http.Header, io.Reader, interface{}) (*http.Response, error) + SetHeaders func(http.Header) + type Logger = interface + Err func(string, error, ...interface{}) + Log func(keyvals ...interface{}) error + Message func(string, ...interface{}) + Printf func(string, ...interface{}) + type Message struct + Content string + ReplyTo MessageReference + Tts bool + func (m Message) MarshalToJSON() ([]byte, error) + type MessageReference struct + ChannelID string + GuildID string + MessageID string + type MessageResponse struct + Attachments []AttachmentResponse + Author UserResponse + ChannelID string + ChannelIDSnowflake snowflake.Snowflake + Content string + EditedTimestamp string + Embeds []EmbedResponse + Flags int + GuildID string + GuildIDSnowflake snowflake.Snowflake + ID string + IDSnowflake snowflake.Snowflake + Member GuildMemberResponse + MentionChannels []ChannelMentionResponse + MentionEveryone bool + MentionRoles []RoleResponse + Mentions []UserResponse + Pinned bool + Reactions []ReactionResponse + TTS bool + Timestamp string + Type int + WebhookID string + WebhookIDSnowflake snowflake.Snowflake + func (mr *MessageResponse) Snowflakify() error + type MessageWithEmbed struct + Content string + Embed Embed + ReplyTo MessageReference + Tts bool + func (m MessageWithEmbed) MarshalToJSON() ([]byte, error) + type ReactionResponse struct + Count int + Emoji EmojiResponse + Me bool + func (rr *ReactionResponse) Snowflakify() error + type RoleResponse struct + Color int + Hoist bool + ID string + IDSnowflake snowflake.Snowflake + Managed bool + Mentionable bool + Name string + Permissions int + Position int + func (rr *RoleResponse) Snowflakify() error + type UserResponse struct + Avatar string + Bot bool + Discriminator string + Email string + Flags int + ID string + IDSnowflake snowflake.Snowflake + Locale string + MFAEnabled bool + Member *GuildMemberResponse + PremiumType int + PublicFlags int + System bool + Username string + Verified bool + func (ur *UserResponse) Snowflakify() error Other modules containing this package github.com/gsmcwhirter/discord-bot-lib/v19