Documentation
¶
Index ¶
- Variables
- func AllChannelIDs() (guildIDs []string, err error)
- func AllGuildIDs() (guildIDs []string, err error)
- func AllUserIDs() (userIDs []string, err error)
- func BotIDForGuild(guildID string) (botID string, err error)
- func Channel(channelID string) (channel *discordgo.Channel, err error)
- func ChannelFromMention(guildID string, mention string) (*discordgo.Channel, error)
- func ChannelMessages(channelID string) (messages []discordgo.Message, err error)
- func Emoji(guildID, emojiID string) (emoji *discordgo.Emoji, err error)
- func Guild(guildID string) (guild *discordgo.Guild, err error)
- func GuildBannedUserIDs(guildID string) (userIDs []string, err error)
- func GuildUserIDs(guildID string) (userIDs []string, err error)
- func IsMember(guildID, userID string) (isMember bool, err error)
- func Member(guildID, userID string) (member *discordgo.Member, err error)
- func Presence(guildID, userID string) (presence *discordgo.Presence, err error)
- func Role(guildID, roleID string) (role *discordgo.Role, err error)
- func SharedStateEventHandler(session *discordgo.Session, i interface{}) error
- func User(userID string) (user *discordgo.User, err error)
- func UserChannelPermissions(userID, channelID string) (apermissions int, err error)
- func UserFromMention(mention string) (*discordgo.User, error)
- func UserPermissions(userID, guildID string) (apermissions int, err error)
Constants ¶
This section is empty.
Variables ¶
var ErrStateNotFound = errors.New("shared state cache not found")
ErrStateNotFound will be returned if the item was not found in the shared state
var ErrTargetWrongServer = errors.New("target is on wrong server")
ErrTargetWrongServer will be returned if the target is on the wrong server
var ErrTargetWrongType = errors.New("target is on wrong server")
ErrTargetWrongType will be returned if the target is on the wrong server
Functions ¶
func AllChannelIDs ¶
AllChannelIDs returns a list of all Channel IDs from the shared state
func AllGuildIDs ¶
AllGuildIDs returns a list of all Guild IDs from the shared state
func AllUserIDs ¶
AllUserIDs returns a list of all User IDs from the shared state
func BotIDForGuild ¶
BotIDForGuild returns a Bot User ID for the given Guild ID
func Channel ¶
Channel returns the specified Channel from the shard state, returns ErrStateNotFound if not found
func ChannelFromMention ¶
ChannelFromMention finds a text channel on the same server in an mention, can be direct ID input
func ChannelMessages ¶
ChannelMessages returns the messages of a channel
func Emoji ¶
Emoji returns the specified Emoji from the shard state, returns ErrStateNotFound if not found
func Guild ¶
Guild returns the specified Guild from the shard state, returns ErrStateNotFound if not found
func GuildBannedUserIDs ¶
GuildBannedUserIDs returns the banned user of a server only contains items if the bot has the Ban Members or Administrator permission
func GuildUserIDs ¶
GuildUserIDs returns a list of all User IDs in a specific Guild from the shared state
func Member ¶
Member returns the specified Member from the shard state, returns ErrStateNotFound if not found
func Presence ¶
Presence returns the specified Presence from the shard state, returns ErrStateNotFound if not found
func Role ¶
Role returns the specified Role from the shard state, returns ErrStateNotFound if not found
func SharedStateEventHandler ¶
SharedStateEventHandler receives events from a discordgo Websocket and updates the shared state with them
func User ¶
User returns the specified User from the shard state, returns ErrStateNotFound if not found
func UserChannelPermissions ¶
UserChannelPermissions returns the permission of a user in a channel
func UserFromMention ¶
UserFromMention finds an user in a mention, can be direct ID input
func UserPermissions ¶
UserPermissions returns the permissions of a user in a guild
Types ¶
This section is empty.