Documentation
¶
Index ¶
- type Bot
- func (b *Bot) BotRespond(i *dc.InteractionCreate, msg string)
- func (b *Bot) CreateChannel(name string) (*dc.Channel, error)
- func (b *Bot) DeleteChannel(channelID string) (*dc.Channel, error)
- func (b *Bot) HandleConnection(id string) *Connection
- func (b *Bot) IsRunning() bool
- func (b *Bot) KillConnection(conn *Connection) *Connection
- func (b *Bot) MakeChannelActive(channelID string) (*dc.Channel, error)
- func (b *Bot) MakeChannelDead(channelID string) (*dc.Channel, error)
- func (b *Bot) SendErrorLog(content string) (*dc.Message, error)
- func (b *Bot) SendInfoLog(content string) (*dc.Message, error)
- func (b *Bot) SendMsg(channelID, content string) (*dc.Message, error)
- func (b *Bot) Start()
- func (b *Bot) Stop() error
- type Client
- type Command
- type Config
- type Connection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
Client *Client
Running bool
Logging bool
LogChannelID string
CustomCommands bool
Commands []Command
// contains filtered or unexported fields
}
func (*Bot) BotRespond ¶
func (b *Bot) BotRespond(i *dc.InteractionCreate, msg string)
func (*Bot) HandleConnection ¶
func (b *Bot) HandleConnection(id string) *Connection
func (*Bot) KillConnection ¶
func (b *Bot) KillConnection(conn *Connection) *Connection
func (*Bot) MakeChannelActive ¶
type Command ¶
type Command struct {
Name string
Description string
Options []*dc.ApplicationCommandOption
Action func(*Bot, *dc.InteractionCreate)
}
type Config ¶
type Config struct {
BotToken string `json:"bot_token"`
GuildID string `json:"guild_id"`
ActiveCategoryID string `json:"active_category_id"`
DeadCategoryID string `json:"dead_category_id"`
TranscriptCategoryID string `json:"transcript_category_id"`
ActiveChannelPrefix string `json:"active_channel_prefix"`
DeadChannelPrefix string `json:"dead_channel_prefix"`
LoggingEnabled bool `json:"logging_enabled"`
CustomCommandsEnabled bool `json:"custom_commands_enabled"`
}
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.