botcontext

package
v0.0.0-...-1cd5ac2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

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 (*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) GetGuild

func (c *BotContext) GetGuild(ctx context.Context, guildId uint64) (guild.Guild, error)

func (*BotContext) GetGuildChannels

func (c *BotContext) GetGuildChannels(ctx context.Context, guildId uint64) ([]channel.Channel, error)

func (*BotContext) GetGuildEmoji

func (c *BotContext) GetGuildEmoji(ctx context.Context, guildId, emojiId uint64) (emoji.Emoji, error)

func (*BotContext) GetGuildEmojis

func (c *BotContext) GetGuildEmojis(ctx context.Context, guildId uint64) ([]emoji.Emoji, error)

func (*BotContext) GetGuildMember

func (c *BotContext) GetGuildMember(ctx context.Context, guildId, userId uint64) (member.Member, error)

func (*BotContext) GetGuildOwner

func (c *BotContext) GetGuildOwner(ctx context.Context, guildId uint64) (uint64, error)

func (*BotContext) GetGuildRoles

func (c *BotContext) GetGuildRoles(ctx context.Context, guildId uint64) ([]guild.Role, error)

func (*BotContext) GetUser

func (c *BotContext) GetUser(ctx context.Context, userId uint64) (user.User, error)

func (*BotContext) IsBotAdmin

func (c *BotContext) IsBotAdmin(_ context.Context, userId uint64) bool

func (*BotContext) ListMembers

func (c *BotContext) ListMembers(ctx context.Context, guildId uint64) ([]member.Member, error)

func (*BotContext) RemoveGuildMemberRole

func (c *BotContext) RemoveGuildMemberRole(ctx context.Context, guildId, userId, roleId uint64) error

func (*BotContext) SearchMembers

func (c *BotContext) SearchMembers(ctx context.Context, guildId uint64, query string) ([]member.Member, error)

Jump to

Keyboard shortcuts

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