Documentation ¶
Index ¶
- func Start(configPath string)
- type Bot
- func (b *Bot) Add(m *dg.MessageCreate, args []string)
- func (b *Bot) Get(s *dg.Session, m *dg.MessageCreate, args []string)
- func (b *Bot) List(s *dg.Session, m *dg.MessageCreate)
- func (b *Bot) Remove(s *dg.Session, m *dg.MessageCreate, args []string)
- func (b *Bot) RemoveFromChannel(s *discordgo.Session, m *discordgo.MessageCreate, question string)
- func (b *Bot) Set(s *dg.Session, m *dg.MessageCreate, args []string)
- func (b *Bot) Sync(s *dg.Session, m *dg.MessageCreate)
- type Config
- type Controller
- type FaQ
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) Add ¶
func (b *Bot) Add(m *dg.MessageCreate, args []string)
This is the add command args = [prefix, add, question ... \n .. answer]
func (*Bot) RemoveFromChannel ¶
This will remove a question from the FaQ channel (it will seek up to 100 messages)
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func GetController ¶
func GetController(location string) Controller
This will get a new database controller
func (Controller) Add ¶
func (c Controller) Add(guild string, question string, answer string) error
Add a new question / answer
func (Controller) GetAll ¶
func (c Controller) GetAll(guild string) ([]FaQ, error)
Get all the FaQ's from a guild
Click to show internal directories.
Click to hide internal directories.