Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyzeSentence ¶
type AnalyzeSentence struct {
Sentence string
}
AnalyzeSentence is the struct for our wit ai command
func (AnalyzeSentence) ExecuteWitCommand ¶
func (command AnalyzeSentence) ExecuteWitCommand() *wit.Analysis
ExecuteWitCommand is the function that calls wit ai API to understand sentence
type Command ¶
type Command interface {
Execute() error
}
Command is the interface used to handle all our commands (meteo, music, ai...)
type GenericCommand ¶
type GenericCommand struct { Analysis *wit.Analysis Session connectors.Discord Message *discordgo.MessageCreate }
GenericCommand is the structure needed for every command. All Commands implements it.
func (*GenericCommand) Build ¶
func (gc *GenericCommand) Build() (Command, error)
Build a command depending on the analysis result we give
type QueryGoogleCommand ¶
type QueryGoogleCommand struct { Connector connectors.Discord Message *discordgo.MessageCreate }
QueryGoogleCommand is the struct for our google query command
func (QueryGoogleCommand) Execute ¶
func (command QueryGoogleCommand) Execute() error
Execute is the function we use for the google search command
type QueryWeatherCommand ¶
type QueryWeatherCommand struct {
// contains filtered or unexported fields
}
QueryWeatherCommand is the command to ask for meteo
func (QueryWeatherCommand) Execute ¶
func (command QueryWeatherCommand) Execute() error
Execute command to get results from api weather
type QueryYoutubeVideoCommand ¶
type QueryYoutubeVideoCommand struct {
// contains filtered or unexported fields
}
QueryYoutubeVideoCommand is the struct for our youtube query command
func (QueryYoutubeVideoCommand) Execute ¶
func (command QueryYoutubeVideoCommand) Execute() error
Execute function of the youtube query command