Versions in this module Expand all Collapse all v23 v23.5.0 Nov 19, 2021 v23.4.0 Nov 18, 2021 v23.3.0 Nov 18, 2021 v23.2.0 Nov 18, 2021 Changes in this version + type ApplicationCommandPermission struct + IDSnowflake snowflake.Snowflake + IDString string + Permission bool + Type CommandPermissionType + func (p *ApplicationCommandPermission) Snowflakify() error + type ApplicationCommandPermissions struct + ApplicationIDSnowflake snowflake.Snowflake + ApplicationIDString string + GuildIDSnowflake snowflake.Snowflake + GuildIDString string + IDSnowflake snowflake.Snowflake + IDString string + Permissions []ApplicationCommandPermission + func (p *ApplicationCommandPermissions) Snowflakify() error + type CommandPermissionType int + const CommandPermissionRole + const CommandPermissionUser v23.1.0 Nov 18, 2021 v23.0.0 Nov 18, 2021 Changes in this version + var ErrBadOptType = errors.New("bad option type value") + type ApplicationCommand struct + ApplicationID string + ApplicationIDSnowflake snowflake.Snowflake + DefaultPermission bool + Description string + GuildID string + GuildIDSnowflake snowflake.Snowflake + ID string + IDSnowflake snowflake.Snowflake + Name string + Options []ApplicationCommandOption + Type ApplicationCommandType + Version string + VersionSnowflake snowflake.Snowflake + func (c *ApplicationCommand) Snowflakify() error + type ApplicationCommandInteractionOption struct + Focused bool + Name string + Options []ApplicationCommandInteractionOption + Type ApplicationCommandOptionType + Value stdjson.RawMessage + ValueBool bool + ValueChannel snowflake.Snowflake + ValueInt int + ValueNumber float64 + ValueRole snowflake.Snowflake + ValueString string + ValueSubCommand string + ValueSubCommandGroup string + ValueUser snowflake.Snowflake + func ApplicationCommandInteractionOptionFromElement(e etfapi.Element) (ApplicationCommandInteractionOption, error) + func (i *ApplicationCommandInteractionOption) PackValue() error + func (i *ApplicationCommandInteractionOption) ResolveValue() error + type ApplicationCommandOption struct + Autocomplete bool + ChannelTypes []ChannelType + Choices []ApplicationCommandOptionChoice + Description string + Name string + Options []ApplicationCommandOption + Required bool + Type ApplicationCommandOptionType + func (o *ApplicationCommandOption) Snowflakify() error + type ApplicationCommandOptionChoice struct + Name string + Type ApplicationCommandOptionType + Value stdjson.RawMessage + ValueInt int + ValueNumber float64 + ValueString string + func (c *ApplicationCommandOptionChoice) FillValue() error + func (c *ApplicationCommandOptionChoice) MarshalJSON() ([]byte, error) + func (c *ApplicationCommandOptionChoice) ResolveValue() error + type ApplicationCommandOptionType int + const OptTypeBoolean + const OptTypeChannel + const OptTypeInteger + const OptTypeMentionable + const OptTypeNumber + const OptTypeRole + const OptTypeString + const OptTypeSubCommand + const OptTypeSubCommandGroup + const OptTypeUser + func ApplicationCommandOptionTypeFromElement(e etfapi.Element) (ApplicationCommandOptionType, error) + type ApplicationCommandType int + const CmdTypeChatInput + const CmdTypeMessage + const CmdTypeUser + func ApplicationCommandTypeFromElement(e etfapi.Element) (ApplicationCommandType, error) + type Attachment struct + Filename string + Height int + ID string + IDSnowflake snowflake.Snowflake + ProxyURL string + Size int + URL string + Width int + func (ar *Attachment) Snowflakify() error + type Channel struct + ApplicationIDSnowflake snowflake.Snowflake + ApplicationIDString string + Bitrate int + GuildIDSnowflake snowflake.Snowflake + GuildIDString string + IDSnowflake snowflake.Snowflake + IDString string + Icon string + LastMessageIDSnowflake snowflake.Snowflake + LastMessageIDString string + LastPinTimestamp string + MemberCount int + MessageCount int + NSFW bool + Name string + OwnerIDSnowflake snowflake.Snowflake + OwnerIDString string + ParentIDSnowflake snowflake.Snowflake + ParentIDString string + PermissionOverwrites []PermissionOverwrite + Permissions string + PermissionsSnowflake snowflake.Snowflake + Position int + RTCRegion string + Recipients []User + Topic string + Type ChannelType + UserLimit int + VideoQualityMode int + func ChannelFromElement(e etfapi.Element) (Channel, error) + func (c *Channel) Snowflakify() error + type ChannelType int + const ChannelDM + const ChannelGroupDM + const ChannelGuildCategory + const ChannelGuildNews + const ChannelGuildNewsThread + const ChannelGuildPrivateThread + const ChannelGuildPublicThread + const ChannelGuildStageVoice + const ChannelGuildStore + const ChannelGuildText + const ChannelGuildVoice + func ChannelTypeFromElement(e etfapi.Element) (ChannelType, error) + type Embed struct + Author EmbedAuthor + Color int + Description string + Fields []EmbedField + Footer EmbedFooter + Image EmbedImage + Provider EmbedProvider + Thumbnail EmbedImage + Timestamp string + Title string + Type string + URL string + Video EmbedImage + type EmbedAuthor struct + IconURL string + Name string + ProxyIconURL string + URL string + type EmbedField struct + Inline bool + Name string + Value string + type EmbedFooter struct + IconURL string + ProxyIconURL string + Text string + type EmbedImage struct + Height int + ProxyURL string + URL string + Width int + type EmbedProvider struct + Name string + URL string + type Emoji struct + Animated bool + Available bool + ID string + IDSnowflake snowflake.Snowflake + Managed bool + Name string + RequireColons bool + Roles []Role + User User + func (er *Emoji) Snowflakify() error + type Gateway struct + Shards int + URL string + type GuildMember struct + Deaf bool + JoinedAt string + Mute bool + Nick string + PremiumSince string + RoleSnowflakes []snowflake.Snowflake + Roles []string + User *User + func GuildMemberFromElement(e etfapi.Element) (GuildMember, error) + func (gmr *GuildMember) Snowflakify() error + func (gmr GuildMember) HasRole(rid snowflake.Snowflake) bool + type Interaction struct + ApplicationIDSnowflake snowflake.Snowflake + ApplicationIDString string + ChannelIDSnowflake snowflake.Snowflake + ChannelIDString string + Data *InteractionData + GuildIDSnowflake snowflake.Snowflake + GuildIDString string + IDSnowflake snowflake.Snowflake + IDString string + Member *GuildMember + Message *Message + Token string + Type InteractionType + User *User + Version int + func InteractionFromElementMap(eMap map[string]etfapi.Element) (Interaction, error) + type InteractionData struct + IDSnowflake snowflake.Snowflake + IDString string + Name string + Options []ApplicationCommandInteractionOption + Resolved ResolvedData + TargetIDSnowflake snowflake.Snowflake + TargetIDString string + Type ApplicationCommandType + func InteractionDataFromElement(e etfapi.Element) (InteractionData, error) + type InteractionType int + const InteractionApplicationCommand + const InteractionAutocomplete + const InteractionMessageComponent + const InteractionPing + func InteractionTypeFromElement(e etfapi.Element) (InteractionType, error) + type Message struct + Attachments []Attachment + Author User + ChannelIDSnowflake snowflake.Snowflake + ChannelIDString string + Content string + EditedTimestamp string + Embeds []Embed + Flags int + GuildIDSnowflake snowflake.Snowflake + GuildIDString string + IDSnowflake snowflake.Snowflake + IDString string + Member GuildMember + MentionChannels []Channel + MentionEveryone bool + MentionRoles []snowflake.Snowflake + MentionRolesStrings []string + Mentions []User + Pinned bool + Reactions []MessageReaction + TTS bool + Timestamp string + Type MessageType + WebhookID string + WebhookIDSnowflake snowflake.Snowflake + func MessageFromElement(e etfapi.Element) (Message, error) + func MessageFromElementMap(eMap map[string]etfapi.Element) (Message, error) + func (m *Message) AuthorID() snowflake.Snowflake + func (m *Message) ChannelID() snowflake.Snowflake + func (m *Message) ContentString() string + func (m *Message) ID() snowflake.Snowflake + func (m *Message) MessageType() MessageType + func (m *Message) Snowflakify() error + type MessageReaction struct + Count int + Emoji Emoji + Me bool + func (rr *MessageReaction) Snowflakify() error + type MessageType int + const CallMessage + const ChannelIconChangeMessage + const ChannelNameChangeMessage + const ChannelPinnedMessageMessage + const DefaultMessage + const GuildMemberJoinMessage + const RecipientAddMessage + const RecipientRemoveMessage + func MessageTypeFromElement(e etfapi.Element) (MessageType, error) + func (t MessageType) String() string + type PermissionOverwrite struct + AllowSnowflake snowflake.Snowflake + AllowString string + DenySnowflake snowflake.Snowflake + DenyString string + IDSnowflake snowflake.Snowflake + IDString string + Type int + func PermissionOverwriteFromElement(e etfapi.Element) (PermissionOverwrite, error) + func (ow *PermissionOverwrite) Snowflakify() error + type Reaction struct + ChannelIDSnowflake snowflake.Snowflake + ChannelIDString string + EmojiString string + GuildIDSnowflake snowflake.Snowflake + GuildIDString string + MessageIDSnowflake snowflake.Snowflake + MessageIDString string + UserIDSnowflake snowflake.Snowflake + UserIDString string + func ReactionFromElement(e etfapi.Element) (Reaction, error) + func ReactionFromElementMap(eMap map[string]etfapi.Element) (Reaction, error) + func (r *Reaction) ChannelID() snowflake.Snowflake + func (r *Reaction) Emoji() string + func (r *Reaction) GuildID() snowflake.Snowflake + func (r *Reaction) MessageID() snowflake.Snowflake + func (r *Reaction) UserID() snowflake.Snowflake + type ResolvedData struct + Channels map[snowflake.Snowflake]Channel + Members map[snowflake.Snowflake]GuildMember + Roles map[snowflake.Snowflake]Role + Users map[snowflake.Snowflake]User + func ResolvedDataFromElement(e etfapi.Element) (ResolvedData, error) + type Role struct + Color int + Hoist bool + IDSnowflake snowflake.Snowflake + IDString string + Managed bool + Mentionable bool + Name string + PermissionsSnowflake snowflake.Snowflake + PermissionsString string + Position int + func RoleFromElement(e etfapi.Element) (Role, error) + func (rr *Role) Snowflakify() error + type User struct + Avatar string + Bot bool + Discriminator string + Email string + Flags int + ID string + IDSnowflake snowflake.Snowflake + Locale string + MFAEnabled bool + Member *GuildMember + PremiumType int + PublicFlags int + System bool + Username string + Verified bool + func UserFromElement(e etfapi.Element) (User, error) + func (u *User) Snowflakify() error + func (u *User) UpdateFromElementMap(eMap map[string]etfapi.Element) error Other modules containing this package github.com/gsmcwhirter/discord-bot-lib/v22 github.com/gsmcwhirter/discord-bot-lib/v24