Documentation
¶
Index ¶
- type BotContext
- func (c *BotContext) Cache() permission.PermissionCache
- func (c *BotContext) CreateGuildCommand(ctx context.Context, guildId uint64, data rest.CreateCommandData) (interaction.ApplicationCommand, error)
- func (c *BotContext) CreateGuildRole(ctx context.Context, guildId uint64, data rest.GuildRoleData) (guild.Role, error)
- func (c *BotContext) Db() *database.Database
- func (c *BotContext) DeleteGuildCommand(ctx context.Context, guildId, commandId uint64) error
- func (c *BotContext) DeleteGuildRole(ctx context.Context, guildId, roleId uint64) error
- func (c *BotContext) GetGuild(ctx context.Context, guildId uint64) (guild.Guild, error)
- func (c *BotContext) GetGuildChannels(ctx context.Context, guildId uint64) ([]channel.Channel, error)
- func (c *BotContext) GetGuildEmoji(ctx context.Context, guildId, emojiId uint64) (emoji.Emoji, error)
- func (c *BotContext) GetGuildEmojis(ctx context.Context, guildId uint64) ([]emoji.Emoji, error)
- func (c *BotContext) GetGuildMember(ctx context.Context, guildId, userId uint64) (member.Member, error)
- func (c *BotContext) GetGuildOwner(ctx context.Context, guildId uint64) (uint64, error)
- func (c *BotContext) GetGuildRoles(ctx context.Context, guildId uint64) ([]guild.Role, error)
- func (c *BotContext) GetUser(ctx context.Context, userId uint64) (user.User, error)
- func (c *BotContext) IsBotAdmin(_ context.Context, userId uint64) bool
- func (c *BotContext) ListMembers(ctx context.Context, guildId uint64) ([]member.Member, error)
- func (c *BotContext) RemoveGuildMemberRole(ctx context.Context, guildId, userId, roleId uint64) error
- func (c *BotContext) SearchMembers(ctx context.Context, guildId uint64, query string) ([]member.Member, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotContext ¶
type BotContext struct {
BotId uint64
Token string
RateLimiter *ratelimit.Ratelimiter
RestCache restcache.RestCache
}
func ContextForGuild ¶
func ContextForGuild(guildId uint64) (*BotContext, error)
func PublicContext ¶
func PublicContext() *BotContext
func (*BotContext) Cache ¶
func (c *BotContext) Cache() permission.PermissionCache
func (*BotContext) CreateGuildCommand ¶
func (c *BotContext) CreateGuildCommand(ctx context.Context, guildId uint64, data rest.CreateCommandData) (interaction.ApplicationCommand, error)
func (*BotContext) CreateGuildRole ¶
func (c *BotContext) CreateGuildRole(ctx context.Context, guildId uint64, data rest.GuildRoleData) (guild.Role, error)
func (*BotContext) Db ¶
func (c *BotContext) Db() *database.Database
func (*BotContext) DeleteGuildCommand ¶
func (c *BotContext) DeleteGuildCommand(ctx context.Context, guildId, commandId uint64) error
func (*BotContext) DeleteGuildRole ¶
func (c *BotContext) DeleteGuildRole(ctx context.Context, guildId, roleId uint64) error
func (*BotContext) GetGuildChannels ¶
func (*BotContext) GetGuildEmoji ¶
func (*BotContext) GetGuildEmojis ¶
func (*BotContext) GetGuildMember ¶
func (*BotContext) GetGuildOwner ¶
func (*BotContext) GetGuildRoles ¶
func (*BotContext) IsBotAdmin ¶
func (c *BotContext) IsBotAdmin(_ context.Context, userId uint64) bool
func (*BotContext) ListMembers ¶
func (*BotContext) RemoveGuildMemberRole ¶
func (c *BotContext) RemoveGuildMemberRole(ctx context.Context, guildId, userId, roleId uint64) error
func (*BotContext) SearchMembers ¶
Click to show internal directories.
Click to hide internal directories.