Documentation ¶
Overview ¶
Package avakian implements Avakian's Discord client.
Index ¶
- Variables
- type Bot
- func (b *Bot) AddRole(ctx context.Context, gid, mid, rid, reason string) error
- func (b *Bot) CheckPermission(ctx context.Context, sess bot.Session) (int, error)
- func (b *Bot) Connect(ctx context.Context) error
- func (b *Bot) CreateRole(ctx context.Context, gid, reason string, settings ...discord.RoleSetting) (*discord.Role, error)
- func (b *Bot) DeleteRole(ctx context.Context, gid, rid, reason string) error
- func (b *Bot) Disconnect()
- func (b *Bot) FetchChannel(ctx context.Context, id string) (*discord.Channel, error)
- func (b *Bot) FetchGuild(ctx context.Context, id string) (*discord.Guild, error)
- func (b *Bot) FetchMember(ctx context.Context, mid, gid string) (*discord.GuildMember, error)
- func (b *Bot) FetchMemberPermissions(ctx context.Context, gid, cid, mid string) (int, error)
- func (b *Bot) GuildPrefixes(ctx context.Context, id string) ([]string, error)
- func (b *Bot) IsAdmin(sf string) bool
- func (b *Bot) RemoveRole(ctx context.Context, gid, mid, rid, reason string) error
- func (b *Bot) SendMessage(ctx context.Context, target string, message string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClientOption = errors.New("bot: missing required option")
)
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { Debug bool DefaultPrefix string Admins []string Twitter *twitter.Client DB *sql.DB Logger *zap.Logger Client *harmony.Client }
func (*Bot) CheckPermission ¶
func (*Bot) CreateRole ¶
func (*Bot) DeleteRole ¶
func (*Bot) Disconnect ¶
func (b *Bot) Disconnect()
func (*Bot) FetchChannel ¶
func (*Bot) FetchGuild ¶
func (*Bot) FetchMember ¶
func (*Bot) FetchMemberPermissions ¶
func (*Bot) GuildPrefixes ¶
func (*Bot) RemoveRole ¶
type Option ¶
type Option func(*Bot)
func WithAdmins ¶
func WithClient ¶
func WithDefaultPrefix ¶
func WithLogger ¶
func WithTwitter ¶
Click to show internal directories.
Click to hide internal directories.