Documentation ¶
Index ¶
- Variables
- func RemoveName(user, message string) string
- func SendEmote(c *gomatrix.Client, roomID, message string) error
- func SendHTML(c *gomatrix.Client, roomID, message string) error
- func SendImage(c *gomatrix.Client, roomID string, img *image.RGBA) error
- func SendMD(c *gomatrix.Client, roomID, message string) error
- func SendMDNotice(c *gomatrix.Client, roomID, message string) error
- func SendNotice(c *gomatrix.Client, roomID, message string) error
- func SendText(c *gomatrix.Client, roomID, message string) error
- func SendUnescNotice(c *gomatrix.Client, roomID, message string) error
- func ToMe(user, message string) bool
- type Ban
- type BananaStab
- func (h *BananaStab) Descr() string
- func (h *BananaStab) Match(_, msg string) bool
- func (h *BananaStab) Name() string
- func (h *BananaStab) Process(from, post string) string
- func (h *BananaStab) Re() string
- func (h *BananaStab) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *BananaStab) SetStore(_ PluginStore)
- type Beat
- type Beer
- func (h *Beer) Descr() string
- func (h *Beer) Match(_, msg string) bool
- func (h *Beer) Name() string
- func (h *Beer) Process(from, msg string) string
- func (h *Beer) Re() string
- func (h *Beer) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *Beer) SetStore(_ PluginStore)
- type BeerResp
- type BotSnack
- func (h *BotSnack) Descr() string
- func (h *BotSnack) Match(_, msg string) bool
- func (h *BotSnack) Name() string
- func (h *BotSnack) Process(from, msg string) string
- func (h *BotSnack) Re() string
- func (h *BotSnack) RespondText(c *gomatrix.Client, ev *gomatrix.Event, user, post string) error
- func (h *BotSnack) SetStore(_ PluginStore)
- type CloudsResp
- type CoordResp
- type DMR
- type DMRRepeater
- type DMRUser
- type FedResp
- type Feder
- func (h *Feder) Descr() string
- func (h *Feder) Match(_, msg string) bool
- func (h *Feder) Name() string
- func (h *Feder) Process(from, post string) string
- func (h *Feder) Re() string
- func (h *Feder) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *Feder) SetStore(_ PluginStore)
- type FeelsResp
- type Fields
- type Geometry
- type Groan
- func (h *Groan) Descr() string
- func (h *Groan) Match(user, msg string) bool
- func (h *Groan) Name() string
- func (h *Groan) Process(_, _ string) string
- func (h *Groan) Re() string
- func (h *Groan) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *Groan) SetStore(_ PluginStore)
- type HTTPRequest
- type Ham
- type Hi
- type HighFive
- func (h *HighFive) Descr() string
- func (h *HighFive) Match(user, msg string) bool
- func (h *HighFive) Name() string
- func (h *HighFive) Process(from, post string) string
- func (h *HighFive) Re() string
- func (h *HighFive) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *HighFive) SetStore(_ PluginStore)
- type Homestead
- func (h *Homestead) Descr() string
- func (h *Homestead) Match(_, msg string) bool
- func (h *Homestead) Name() string
- func (h *Homestead) Process(from, post string) string
- func (h *Homestead) Re() string
- func (h *Homestead) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *Homestead) SetStore(s PluginStore)
- type HomesteadResp
- type LicenseResp
- type LoveYou
- func (h *LoveYou) Descr() string
- func (h *LoveYou) Match(user, msg string) bool
- func (h *LoveYou) Name() string
- func (h *LoveYou) Process(from, post string) string
- func (h *LoveYou) Re() string
- func (h *LoveYou) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, _ string) error
- func (h *LoveYou) SetStore(_ PluginStore)
- type MainResp
- type OpenBSDMan
- func (h *OpenBSDMan) Descr() string
- func (h *OpenBSDMan) Match(_, msg string) bool
- func (h *OpenBSDMan) Name() string
- func (h *OpenBSDMan) Process(from, post string) string
- func (h *OpenBSDMan) Re() string
- func (h *OpenBSDMan) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *OpenBSDMan) SetStore(_ PluginStore)
- type PGP
- type Palette
- func (h *Palette) Descr() string
- func (h *Palette) Match(_, msg string) bool
- func (h *Palette) Name() string
- func (h *Palette) Process(_, _ string) string
- func (h *Palette) Re() string
- func (h *Palette) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *Palette) SetStore(_ PluginStore)
- type Parameters
- type Plugin
- type PluginStore
- type Plugins
- type RFC
- type Records
- type Salute
- func (h *Salute) Descr() string
- func (h *Salute) Match(user, msg string) bool
- func (h *Salute) Name() string
- func (h *Salute) Process(from, post string) string
- func (h *Salute) Re() string
- func (h *Salute) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *Salute) SetStore(_ PluginStore)
- type ServiceInfo
- type Snap
- func (p *Snap) Descr() string
- func (p *Snap) Match(_, msg string) bool
- func (p *Snap) Name() string
- func (p *Snap) Process(from, post string) string
- func (p *Snap) Re() string
- func (p *Snap) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, _ string) error
- func (p *Snap) SetStore(_ PluginStore)
- type Songwhip
- func (s *Songwhip) Descr() string
- func (s *Songwhip) Match(_, msg string) bool
- func (s *Songwhip) Name() string
- func (s *Songwhip) Process(from, post string) string
- func (s *Songwhip) Re() string
- func (s *Songwhip) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (s *Songwhip) SetStore(_ PluginStore)
- type SongwhipReq
- type SongwhipResp
- type Source
- func (h *Source) Descr() string
- func (h *Source) Match(user, msg string) bool
- func (h *Source) Name() string
- func (h *Source) Process(from, post string) string
- func (h *Source) Re() string
- func (h *Source) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, _ string) error
- func (h *Source) SetStore(_ PluginStore)
- type SysResp
- type Thanks
- func (h *Thanks) Descr() string
- func (h *Thanks) Match(user, msg string) bool
- func (h *Thanks) Name() string
- func (h *Thanks) Process(from, post string) string
- func (h *Thanks) Re() string
- func (h *Thanks) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, _ string) error
- func (h *Thanks) SetStore(_ PluginStore)
- type Toki
- func (t *Toki) Descr() string
- func (t *Toki) Match(_, msg string) bool
- func (t *Toki) Name() string
- func (t *Toki) Print(w string) string
- func (t *Toki) Process(from, post string) string
- func (t *Toki) Re() string
- func (t *Toki) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (t *Toki) SetStore(_ PluginStore)
- func (t *Toki) Words() []string
- type Version
- func (v *Version) Descr() string
- func (v *Version) Match(user, msg string) bool
- func (v *Version) Name() string
- func (v *Version) Process(_, _ string) string
- func (v *Version) Re() string
- func (v *Version) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, _ string) error
- func (v *Version) SetStore(_ PluginStore)
- type Wb
- type Weather
- func (h *Weather) Descr() string
- func (h *Weather) Match(_, msg string) bool
- func (h *Weather) Name() string
- func (h *Weather) Process(from, post string) string
- func (h *Weather) Re() string
- func (h *Weather) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *Weather) SetStore(s PluginStore)
- type WeatherResp
- type WindResp
- type Yeah
- func (h *Yeah) Descr() string
- func (h *Yeah) Match(user, msg string) bool
- func (h *Yeah) Name() string
- func (h *Yeah) Process(from, post string) string
- func (h *Yeah) Re() string
- func (h *Yeah) RespondText(c *gomatrix.Client, ev *gomatrix.Event, _, post string) error
- func (h *Yeah) SetStore(_ PluginStore)
Constants ¶
This section is empty.
Variables ¶
var NameRE = regexp.MustCompile(`@(.+):.+$`)
NameRE matches the "friendly" name. This is typically used in tab completion.
var Plugs = Plugins{ &Ban{}, &BananaStab{}, &Beat{}, &Beer{}, &BotSnack{}, &DMR{}, &Feder{}, &Groan{}, &Ham{}, &Hi{}, &HighFive{}, &Homestead{}, &LoveYou{}, &OpenBSDMan{}, &Palette{}, &PGP{}, &RFC{}, &Salute{}, &Snap{}, &Songwhip{}, &Source{}, &Thanks{}, &Toki{}, &Version{}, &Wb{}, &Weather{}, &Yeah{}, }
Plugs defines the "enabled" plugins.
var TokiLang = map[string][]Toki{}/* 239 elements not displayed */
TokiLang is our full representation of toki pona
Functions ¶
func RemoveName ¶
RemoveName removes the friendly name from a given message
func SendEmote ¶ added in v1.0.6
SendEmote sends an emote to a given room. It pretends to be "typing" by calling UserTyping for the caller.
func SendHTML ¶
SendHTML sends an html message to a given room. It pretends to be "typing" by calling UserTyping for the caller.
func SendMDNotice ¶
SendMDNotice sends an html notice to a given room. It pretends to be "typing" by calling UserTyping for the caller.
func SendNotice ¶
SendNotice sends an text notice to a given room. It pretends to be "typing" by calling UserTyping for the caller.
func SendText ¶
SendText sends a text message to a given room. It pretends to be "typing" by calling UserTyping for the caller.
func SendUnescNotice ¶ added in v1.0.5
SendUnescNotice sends an text notice to a given room. It pretends to be "typing" by calling UserTyping for the caller.
Types ¶
type Ban ¶ added in v1.0.6
type Ban struct { }
Ban responds to ban messages
func (*Ban) RespondText ¶ added in v1.0.6
RespondText to botsnack events
func (*Ban) SetStore ¶ added in v1.0.6
func (h *Ban) SetStore(_ PluginStore)
SetStore we don't need a store, so just return
type BananaStab ¶ added in v1.0.6
type BananaStab struct { }
func (*BananaStab) Descr ¶ added in v1.0.6
func (h *BananaStab) Descr() string
Descr describes this plugin
func (*BananaStab) Match ¶ added in v1.0.6
func (h *BananaStab) Match(_, msg string) bool
Match checks for our stabee person
func (*BananaStab) Process ¶ added in v1.0.6
func (h *BananaStab) Process(from, post string) string
func (*BananaStab) Re ¶ added in v1.0.6
func (h *BananaStab) Re() string
Re matches our stabbing format
func (*BananaStab) RespondText ¶ added in v1.0.6
RespondText stabs an unsuspecting person
func (*BananaStab) SetStore ¶ added in v1.0.6
func (h *BananaStab) SetStore(_ PluginStore)
SetStore does nothing in BananaStab
type Beat ¶
type Beat struct { }
Beat responds to beat messages
func (*Beat) RespondText ¶
RespondText to beat request events
type Beer ¶
type Beer struct { }
Beer responds to beer requests
func (*Beer) RespondText ¶
RespondText to looking up of beer requests
type BeerResp ¶
type BeerResp struct { Nhits int `json:"nhits"` Parameters Parameters `json:"parameters"` Records []Records `json:"records"` }
BeerResp represents our response from the api
type BotSnack ¶
type BotSnack struct { }
BotSnack responds to botsnack messages
func (*BotSnack) RespondText ¶
RespondText to botsnack events
func (*BotSnack) SetStore ¶
func (h *BotSnack) SetStore(_ PluginStore)
SetStore we don't need a store, so just return
type DMR ¶
type DMR struct { }
DMR is our plugin type
func (*DMR) RespondText ¶
RespondText to looking up of DMR info
func (*DMR) SetStore ¶
func (p *DMR) SetStore(s PluginStore)
SetStore is the setup function for a plugin
type DMRRepeater ¶
type DMRRepeater struct { Count int `json:"count"` Results []struct { Callsign string `json:"callsign"` City string `json:"city"` ColorCode int `json:"color_code"` Country string `json:"country"` Details string `json:"details"` Frequency string `json:"frequency"` ID string `json:"id"` IpscNetwork string `json:"ipsc_network"` Offset string `json:"offset"` Rfinder string `json:"rfinder"` State string `json:"state"` Trustee string `json:"trustee"` TsLinked string `json:"ts_linked"` } `json:"results"` }
DMRRepeater represents a response from: https://database.radioid.net/api/dmr/repeater/
type DMRUser ¶
type DMRUser struct { Count int `json:"count"` Results []struct { Callsign string `json:"callsign"` City string `json:"city"` Country string `json:"country"` Fname string `json:"fname"` ID int `json:"id"` Remarks string `json:"remarks"` State string `json:"state"` Surname string `json:"surname"` } `json:"results"` }
DMRUser represents a response from: https://database.radioid.net/api/dmr/user/
type FedResp ¶
type FedResp struct { Status bool `json:"FederationOK"` Info ServiceInfo `json:"Version"` }
FedResp represents a federation statuse response
type Feder ¶
type Feder struct { }
Feder responds to federation check requests
func (*Feder) RespondText ¶
RespondText to looking up of federation check requests
func (*Feder) SetStore ¶
func (h *Feder) SetStore(_ PluginStore)
SetStore we don't need a store here.
type FeelsResp ¶
type FeelsResp struct { ID int `json:"id"` Main string `json:"main"` Description string `json:"description"` Icon string `json:"icon"` }
FeelsResp represents the friendly info like "light rain"
type Fields ¶
type Fields struct { Website string `json:"website"` City string `json:"city"` StyleID string `json:"style_id"` Name string `json:"name"` Country string `json:"country"` CatID string `json:"cat_id"` BreweryID string `json:"brewery_id"` Descript string `json:"descript"` Upc int `json:"upc"` Coordinates []float64 `json:"coordinates"` Ibu int `json:"ibu"` CatName string `json:"cat_name"` LastMod time.Time `json:"last_mod"` State string `json:"state"` StyleName string `json:"style_name"` Abv float64 `json:"abv"` Address1 string `json:"address1"` NameBreweries string `json:"name_breweries"` Srm int `json:"srm"` ID string `json:"id"` AddUser string `json:"add_user"` }
Fields are the bits of info we care about
type Groan ¶
type Groan struct { }
Groan responds to groans.
func (*Groan) RespondText ¶
RespondText to groan events
func (*Groan) SetStore ¶
func (h *Groan) SetStore(_ PluginStore)
SetStore we don't need a store here.
type HTTPRequest ¶
type HTTPRequest struct { Client http.Client Request *http.Request Timeout time.Duration URL string Method string ReqBody interface{} ResBody interface{} }
HTTPRequest has the bits for making http requests
func (*HTTPRequest) DoJSON ¶
func (h *HTTPRequest) DoJSON() (err error)
DoJSON is a general purpose http mechanic that can be used to get, post.. what evs. The response is always expected to be json
type Ham ¶
type Ham struct{}
Ham for querying the fcc'd uls
func (*Ham) RespondText ¶
RespondText to looking up of federation check requests
type Hi ¶
type Hi struct { }
Hi responds to hi messages
func (*Hi) RespondText ¶
RespondText to hi events
type HighFive ¶
type HighFive struct { }
HighFive high fives!
func (*HighFive) RespondText ¶
RespondText to high five events
func (*HighFive) SetStore ¶
func (h *HighFive) SetStore(_ PluginStore)
SetStore we don't need a store here.
type Homestead ¶ added in v1.0.5
type Homestead struct {
// contains filtered or unexported fields
}
Homestead is our plugin type
func (*Homestead) RespondText ¶ added in v1.0.5
RespondText to looking up of weather lookup requests
func (*Homestead) SetStore ¶ added in v1.0.5
func (h *Homestead) SetStore(s PluginStore)
SetStore is the setup function for a plugin
type HomesteadResp ¶ added in v1.0.5
type HomesteadResp struct { Status string `json:"status"` Data struct { Resulttype string `json:"resultType"` Result []struct { Metric struct { Instance string `json:"instance"` Job string `json:"job"` Name string `json:"name"` } `json:"metric"` Value []interface{} `json:"value"` } `json:"result"` } `json:"data"` }
HomesteadResp is the json returned from our api
type LicenseResp ¶
type LicenseResp struct { Hamdb struct { Version string `json:"version"` Callsign struct { Call string `json:"call"` Class string `json:"class"` Expires string `json:"expires"` Status string `json:"status"` Grid string `json:"grid"` Lat string `json:"lat"` Lon string `json:"lon"` Fname string `json:"fname"` Mi string `json:"mi"` Name string `json:"name"` Suffix string `json:"suffix"` Addr1 string `json:"addr1"` Addr2 string `json:"addr2"` State string `json:"state"` Zip string `json:"zip"` Country string `json:"country"` } `json:"callsign"` Messages struct { Status string `json:"status"` } `json:"messages"` } `json:"hamdb"` }
LicenseResp represents a response from http://hamdb.org/api
type LoveYou ¶
type LoveYou struct { }
LoveYou responds to love messages
func (*LoveYou) RespondText ¶
RespondText to love events
func (*LoveYou) SetStore ¶
func (h *LoveYou) SetStore(_ PluginStore)
SetStore we don't need a store, so just return
type MainResp ¶
type MainResp struct { Temp float64 `json:"temp"` Pressure int `json:"pressure"` Humidity int `json:"humidity"` TempMin float64 `json:"temp_min"` TempMax float64 `json:"temp_max"` }
MainResp contains the bulk of the weather data
type OpenBSDMan ¶
type OpenBSDMan struct { }
OpenBSDMan responds to beer requests
func (*OpenBSDMan) Match ¶
func (h *OpenBSDMan) Match(_, msg string) bool
Match checks for our man page re
func (*OpenBSDMan) Process ¶ added in v1.0.5
func (h *OpenBSDMan) Process(from, post string) string
func (*OpenBSDMan) RespondText ¶
RespondText sends back a man page.
func (*OpenBSDMan) SetStore ¶
func (h *OpenBSDMan) SetStore(_ PluginStore)
SetStore does nothing in OpenBSDMan
type PGP ¶
type PGP struct { }
PGP is our plugin type
func (*PGP) RespondText ¶
RespondText to looking up of PGP info
func (*PGP) SetStore ¶
func (p *PGP) SetStore(s PluginStore)
SetStore is the setup function for a plugin
type Palette ¶
type Palette struct { }
Palette responds to color messages
func (*Palette) RespondText ¶
RespondText to color request events
func (*Palette) SetStore ¶
func (h *Palette) SetStore(_ PluginStore)
SetStore we don't need a store here
type Parameters ¶
type Parameters struct { Dataset []string `json:"dataset"` Timezone string `json:"timezone"` Q string `json:"q"` Rows int `json:"rows"` Format string `json:"format"` }
Parameters are the meta information
type Plugin ¶
type Plugin interface { // Descr returns a brief description of the plugin. Descr() string // Match determines if the plugin's main Respond function should be // called Match(user, message string) bool // Name should return the human readable name of the bot Name() string // Re returns the regular expression that a plugin uses to "match" Re() string // RespondMatrix responds to a Matrix "m.text" event RespondText(c *gomatrix.Client, ev *gomatrix.Event, user, path string) error // Process is the processed response from the plugin. This is useful for // running the plugins outside of the context of Matrix. Process(from, message string) string // SetStore exposes the top level MCStore to a plugin SetStore(s PluginStore) }
Plugin defines the interface a plugin must implement to be used by mcchunkie.
type PluginStore ¶
PluginStore matches MCStore. This allows the main store to be used by plugins.
type Plugins ¶
type Plugins []Plugin
Plugins is a collection of our plugins. An instance of this is iterated over for each message the bot receives.
type RFC ¶
type RFC struct { }
RFC sends rfc urls when someone references an rfc
func (*RFC) RespondText ¶
RespondText sends back a man page.
type Records ¶
type Records struct { Datasetid string `json:"datasetid"` Recordid string `json:"recordid"` Fields Fields `json:"fields"` Geometry Geometry `json:"geometry"` RecordTimestamp time.Time `json:"record_timestamp"` }
Records holds our fileds
type Salute ¶ added in v1.0.6
type Salute struct { }
Salute high fives!
func (*Salute) RespondText ¶ added in v1.0.6
RespondText to high five events
func (*Salute) SetStore ¶ added in v1.0.6
func (h *Salute) SetStore(_ PluginStore)
SetStore we don't need a store here.
type ServiceInfo ¶
type ServiceInfo struct { Name string `json:"name"` Version string `json:"version"` Error string `json:"error"` }
ServiceInfo represents the version info from a response
type Snap ¶
type Snap struct { }
Snap responds to OpenBSD snapshot checks
func (*Snap) RespondText ¶
RespondText to looking up of federation check requests
type Songwhip ¶ added in v1.0.9
type Songwhip struct{}
func (*Songwhip) Match ¶ added in v1.0.9
Match determines if we should call the response for Songwhip
func (*Songwhip) RespondText ¶ added in v1.0.9
RespondText to looking up of federation check requests
func (*Songwhip) SetStore ¶ added in v1.0.9
func (s *Songwhip) SetStore(_ PluginStore)
SetStore we don't need a store here.
type SongwhipReq ¶ added in v1.0.9
type SongwhipReq struct {
URL string `json:"url"`
}
type SongwhipResp ¶ added in v1.0.9
type SongwhipResp struct { Type string `json:"type"` ID int `json:"id"` Path string `json:"path"` PagePath string `json:"pagePath"` Name string `json:"name"` Image string `json:"image"` Links struct { Qobuz bool `json:"qobuz"` Tidal bool `json:"tidal"` Amazon bool `json:"amazon"` Deezer bool `json:"deezer"` Itunes bool `json:"itunes"` Discogs bool `json:"discogs"` Napster bool `json:"napster"` Pandora bool `json:"pandora"` Spotify bool `json:"spotify"` Twitter bool `json:"twitter"` Youtube bool `json:"youtube"` Bandcamp bool `json:"bandcamp"` Facebook bool `json:"facebook"` Audiomack bool `json:"audiomack"` Instagram bool `json:"instagram"` LineMusic bool `json:"lineMusic"` Soundcloud bool `json:"soundcloud"` AmazonMusic bool `json:"amazonMusic"` ItunesStore bool `json:"itunesStore"` MusicBrainz bool `json:"musicBrainz"` YoutubeMusic bool `json:"youtubeMusic"` } `json:"links"` Description interface{} `json:"description"` LinksCountries []string `json:"linksCountries"` SourceCountry string `json:"sourceCountry"` SpotifyID string `json:"spotifyId"` CreatedAtTimestamp int64 `json:"createdAtTimestamp"` RefreshedAtTimestamp int64 `json:"refreshedAtTimestamp"` URL string `json:"url"` }
type Source ¶
type Source struct { }
Source responds to source requests
func (*Source) RespondText ¶
RespondText to questions about TheSource™©®⑨
type SysResp ¶
type SysResp struct { Type int `json:"type"` ID int `json:"id"` Message float64 `json:"message"` Country string `json:"country"` Sunrise int `json:"sunrise"` Sunset int `json:"sunset"` }
SysResp seems to be used internally for something
type Thanks ¶
type Thanks struct { }
Thanks responds to thanks
func (*Thanks) RespondText ¶
RespondText to welcome back events
func (*Thanks) SetStore ¶
func (h *Thanks) SetStore(_ PluginStore)
SetStore we don't need a store here
type Toki ¶
Toki responds to toki pona word queries
func (*Toki) RespondText ¶
RespondText to hi events
type Version ¶
type Version struct { }
Version responds to hi messages
func (*Version) Match ¶
Match checks for "version" anywhere. Might want to tighten this one down at some point
func (*Version) RespondText ¶
RespondText to version events
type Wb ¶
type Wb struct { }
Wb responds to welcome back messages
func (*Wb) RespondText ¶
RespondText to welcome back events
type Weather ¶
type Weather struct {
// contains filtered or unexported fields
}
Weather is our plugin type
func (*Weather) RespondText ¶
RespondText to looking up of weather lookup requests
func (*Weather) SetStore ¶
func (h *Weather) SetStore(s PluginStore)
SetStore is the setup function for a plugin
type WeatherResp ¶
type WeatherResp struct { Coord CoordResp `json:"coord"` Weather []FeelsResp `json:"weather"` Base string `json:"base"` Main MainResp `json:"main"` Visibility int `json:"visibility"` Wind WindResp `json:"wind"` Clouds CloudsResp `json:"clouds"` Dt int `json:"dt"` Sys SysResp `json:"sys"` ID int `json:"id"` Name string `json:"name"` Cod int `json:"cod"` }
WeatherResp is a JSON response from OpenWeatherMap.org
type WindResp ¶
type WindResp struct { Speed float64 `json:"speed"` Deg int `json:"deg"` Gust float64 `json:"gust"` }
WindResp gives us various bits of information about the wind. Direction, etc.
type Yeah ¶ added in v1.0.12
type Yeah struct { }
Yeah puts on the shades
func (*Yeah) RespondText ¶ added in v1.0.12
RespondText to high five events
func (*Yeah) SetStore ¶ added in v1.0.12
func (h *Yeah) SetStore(_ PluginStore)
SetStore we don't need a store here.