Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface {
Start() (finishedSignal chan struct{}, err error)
Stop()
}
App simple application interface to allow starting and stopping
type Config ¶
type Config struct {
Filename string `json:"-"`
GroupMeBotToken groupme.ID
Discord DiscordConfig
StartupMessage string
ShutdownMessage string
}
Config - defines the tokens used to connect to GroupMe and Discord, as well as the messages the bot sends
func ReadConfig ¶
ReadConfig - opens the file with filename and tries the parse the json in a Config
type DiscordConfig ¶
type DiscordMessage ¶
DiscordMessage - wrapper used to add Message interface functions
func (DiscordMessage) GetText ¶
func (m DiscordMessage) GetText() string
GetText - satisfies the Message interface
func (DiscordMessage) GetUsername ¶
func (m DiscordMessage) GetUsername() string
GetUsername - satisfies the Message interface
type GroupMeMessage ¶
GroupMeMessage - wrapper used to add Message interface functions
func (GroupMeMessage) GetText ¶
func (m GroupMeMessage) GetText() string
GetText - satisfies the Message interface
func (GroupMeMessage) GetUsername ¶
func (m GroupMeMessage) GetUsername() string
GetUsername - satisfies the Message interface