mirror of
https://git.klmp200.net/ALFRED/ALFRED.git
synced 2025-01-18 18:46:44 +01:00
Bring Chaos
This commit is contained in:
parent
22060613ad
commit
368ac57b04
@ -2,7 +2,7 @@
|
|||||||
* @Author: Bartuccio Antoine
|
* @Author: Bartuccio Antoine
|
||||||
* @Date: 2018-07-23 15:24:22
|
* @Date: 2018-07-23 15:24:22
|
||||||
* @Last Modified by: klmp200
|
* @Last Modified by: klmp200
|
||||||
* @Last Modified time: 2018-07-26 18:59:19
|
* @Last Modified time: 2018-07-26 22:32:59
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
@ -28,6 +28,7 @@ func main() {
|
|||||||
"/roll": commands.Dice,
|
"/roll": commands.Dice,
|
||||||
"/trump": commands.LastTrumpTweet,
|
"/trump": commands.LastTrumpTweet,
|
||||||
"/trends": commands.TwitterTrends,
|
"/trends": commands.TwitterTrends,
|
||||||
|
"/chaos": commands.TwitterSJW,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := settings.LoadSettings("settings.json", "settings_custom.json"); err != nil {
|
if err := settings.LoadSettings("settings.json", "settings_custom.json"); err != nil {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: Bartuccio Antoine
|
* @Author: Bartuccio Antoine
|
||||||
* @Date: 2018-07-25 18:51:38
|
* @Date: 2018-07-25 18:51:38
|
||||||
* @Last Modified by: klmp200
|
* @Last Modified by: klmp200
|
||||||
* @Last Modified time: 2018-07-26 22:21:29
|
* @Last Modified time: 2018-07-26 22:35:14
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package commands
|
package commands
|
||||||
@ -82,3 +82,17 @@ func TwitterTrends(m *tb.Message) {
|
|||||||
}
|
}
|
||||||
shared.Bot.Send(m.Chat, message)
|
shared.Bot.Send(m.Chat, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TwitterSJW(m *tb.Message) {
|
||||||
|
testOrInitTwitter()
|
||||||
|
tweets, _, err := client.Search.Tweets(&twitter.SearchTweetParams{
|
||||||
|
Query: "#SJW",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
twitterCommunicationError(m)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
for _, tweet := range tweets.Statuses {
|
||||||
|
shared.Bot.Send(m.Chat, tweet.Text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user