Documentation ¶
Index ¶
- type ApiNooter
- type CatHttp
- type Command
- type Commander
- type DiscordNooter
- type DogHttp
- type EchoCommander
- type InfoCommander
- type JavaCommander
- type Message
- type NootCommander
- type NootlangCommander
- type NotificationCommander
- type ParsedMessage
- type PollCommander
- type PossibleArgs
- type RandomCommander
- type RecursionCommander
- type User
- type WeatherCommander
- type WeatherHTTP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiNooter ¶
type ApiNooter interface {
NootMessage(msg string)
}
This is the general nooter interface. If you want your command to work with all platforms, Noot this way
type DiscordNooter ¶
type DiscordNooter struct {
// contains filtered or unexported fields
}
This is a discord specific nooter. If you want to use special discord features, Noot this way
func NewDiscordNooter ¶
func NewDiscordNooter(channel string, session *discordgo.Session) *DiscordNooter
func (*DiscordNooter) NootComplexMessage ¶
func (d *DiscordNooter) NootComplexMessage(complexMessage *discordgo.MessageSend) *discordgo.Message
func (*DiscordNooter) NootDeleteMessage ¶
func (d *DiscordNooter) NootDeleteMessage(msgId string)
func (*DiscordNooter) NootMessage ¶
func (d *DiscordNooter) NootMessage(msg string)
func (*DiscordNooter) NootReact ¶
func (d *DiscordNooter) NootReact(msgId string, reaction string)
type EchoCommander ¶
type EchoCommander struct { }
func (EchoCommander) Handle ¶
func (c EchoCommander) Handle(n ApiNooter, msg Message)
type InfoCommander ¶
type InfoCommander struct {
Content string
}
func NewInfoCommander ¶
func NewInfoCommander(commands []Command) *InfoCommander
func (*InfoCommander) Handle ¶
func (c *InfoCommander) Handle(s ApiNooter, m Message)
type JavaCommander ¶
type JavaCommander struct{}
The `!java` command generates a random Java variable assignment
func (JavaCommander) Handle ¶
func (jc JavaCommander) Handle(n ApiNooter, msg Message)
type Message ¶
type Message struct { Id string // Message id Author User // This is the person who sent the Message Parsed ParsedMessage // This is the parsed message }
type NootCommander ¶
type NootCommander struct{}
func (NootCommander) Handle ¶
func (c NootCommander) Handle(s ApiNooter, m Message)
type NootlangCommander ¶
type NootlangCommander struct{}
func (NootlangCommander) Handle ¶
func (c NootlangCommander) Handle(n ApiNooter, msg Message)
type NotificationCommander ¶
type NotificationCommander struct { NotifierId string NotificationChannelId string NotificationEmoji string }
func NewNotificationCommander ¶
func NewNotificationCommander(configPath string) NotificationCommander
func (NotificationCommander) Handle ¶
func (c NotificationCommander) Handle(s ApiNooter, m Message)
type ParsedMessage ¶
type PollCommander ¶
type PollCommander struct{}
func (PollCommander) Handle ¶
func (c PollCommander) Handle(s ApiNooter, m Message)
type PossibleArgs ¶
type PossibleArgs []string
func (PossibleArgs) Has ¶
func (list PossibleArgs) Has(a string) bool
type RandomCommander ¶
type RandomCommander struct{}
func (RandomCommander) Handle ¶
func (c RandomCommander) Handle(s ApiNooter, m Message)
type RecursionCommander ¶
type RecursionCommander struct { }
func (RecursionCommander) Handle ¶
func (c RecursionCommander) Handle(n ApiNooter, msg Message)
type WeatherCommander ¶
type WeatherCommander struct {
// contains filtered or unexported fields
}
mapped to the cmd command !weather
func NewWeatherCommander ¶
func NewWeatherCommander(tokenFile string) WeatherCommander
func (WeatherCommander) Handle ¶
func (c WeatherCommander) Handle(s ApiNooter, m Message)
Main functionality of the command which handles getting the weather, parsing the json response, then outputting the proper weather report with the apporiate units and associated weather emoji
type WeatherHTTP ¶
type WeatherHTTP struct { Weather []wWeather `json:"weather"` Main wMain `json:"main"` }
the main struct to handle all of the json response from weather api
Click to show internal directories.
Click to hide internal directories.