Bring Chaos

This commit is contained in:
klmp200 2018-07-26 22:36:04 +02:00
parent 22060613ad
commit 368ac57b04
No known key found for this signature in database
GPG key ID: E7245548C53F904B
2 changed files with 17 additions and 2 deletions

View file

@ -2,7 +2,7 @@
* @Author: Bartuccio Antoine
* @Date: 2018-07-25 18:51:38
* @Last Modified by: klmp200
* @Last Modified time: 2018-07-26 22:21:29
* @Last Modified time: 2018-07-26 22:35:14
*/
package commands
@ -82,3 +82,17 @@ func TwitterTrends(m *tb.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)
}
}