mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
cleanup
This commit is contained in:
parent
c2a8b35c12
commit
fdfe327bb3
|
@ -10,6 +10,7 @@ import (
|
|||
|
||||
func BotStatus(channel string, name string, nb *bot.Bot) {
|
||||
resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/botStatus/%s?includeLimits=1", name))
|
||||
|
||||
if err != nil {
|
||||
nb.Send(channel, "Something went wrong FeelsBadMan")
|
||||
log.Error(err)
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
|
||||
func BttvEmotes(channel string, nb *bot.Bot) {
|
||||
resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/emotes/%s/bttv", channel))
|
||||
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
nb.Send(channel, "Something went wrong FeelsBadMan")
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
func EightBall(channel string, nb *bot.Bot) {
|
||||
resp, err := aiden.ApiCall("api/v1/misc/8ball")
|
||||
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
nb.Send(channel, "Something went wrong FeelsBadMan")
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
)
|
||||
|
||||
func FfzEmotes(channel string, nb *bot.Bot) {
|
||||
|
||||
resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/emotes/%s/ffz", channel))
|
||||
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
nb.Send(channel, "Something went wrong FeelsBadMan")
|
||||
|
|
|
@ -9,9 +9,11 @@ import (
|
|||
|
||||
func Firstline(channel string, streamer string, username string, nb *bot.Bot) {
|
||||
ivrResponse, err := ivr.FirstLine(streamer, username)
|
||||
|
||||
if err != nil {
|
||||
nb.Send(channel, fmt.Sprint(err))
|
||||
return
|
||||
}
|
||||
|
||||
nb.Send(channel, ivrResponse)
|
||||
}
|
||||
|
|
|
@ -9,8 +9,10 @@ import (
|
|||
|
||||
func Followage(channel string, streamer string, username string, nb *bot.Bot) {
|
||||
ivrResponse, err := ivr.Followage(streamer, username)
|
||||
|
||||
if err != nil {
|
||||
nb.Send(channel, fmt.Sprint(err))
|
||||
}
|
||||
|
||||
nb.Send(channel, ivrResponse)
|
||||
}
|
||||
|
|
|
@ -9,12 +9,14 @@ import (
|
|||
)
|
||||
|
||||
func Game(channel string, name string, nb *bot.Bot) {
|
||||
|
||||
game, err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/channel/%s/game", name))
|
||||
|
||||
if err != nil {
|
||||
nb.Send(channel, "Something went wrong FeelsBadMan")
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
reply := fmt.Sprintf("@%s was last seen playing: %s", name, game)
|
||||
|
||||
nb.Send(channel, reply)
|
||||
}
|
||||
|
|
|
@ -7,10 +7,12 @@ import (
|
|||
|
||||
func RandomNumber(channel string, nb *bot.Bot) {
|
||||
reply := api.RandomNumber()
|
||||
|
||||
nb.Send(channel, string(reply))
|
||||
}
|
||||
|
||||
func Number(channel string, number string, nb *bot.Bot) {
|
||||
reply := api.Number(number)
|
||||
|
||||
nb.Send(channel, string(reply))
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
|
||||
func ProfilePicture(channel string, target string, nb *bot.Bot) {
|
||||
reply, err := ivr.ProfilePicture(target)
|
||||
|
||||
if err != nil {
|
||||
nb.Send(channel, fmt.Sprint(err))
|
||||
return
|
||||
|
|
|
@ -39,11 +39,14 @@ func Pyramid(channel string, size string, emote string, nb *bot.Bot) {
|
|||
for i := 0; i <= pyramidSize; i++ {
|
||||
pyramidMessageAsc := strings.Repeat(pyramidEmote, i)
|
||||
// fmt.Println(pyramidMessageAsc)
|
||||
|
||||
nb.Send(channel, pyramidMessageAsc)
|
||||
}
|
||||
|
||||
for j := pyramidSize - 1; j >= 0; j-- {
|
||||
pyramidMessageDesc := strings.Repeat(pyramidEmote, j)
|
||||
// fmt.Println(pyramidMessageDesc)
|
||||
|
||||
nb.Send(channel, pyramidMessageDesc)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,5 +7,6 @@ import (
|
|||
|
||||
func RandomXkcd(channel string, nb *bot.Bot) {
|
||||
reply := api.RandomXkcd()
|
||||
|
||||
nb.Send(channel, reply)
|
||||
}
|
||||
|
|
|
@ -8,11 +8,12 @@ import (
|
|||
)
|
||||
|
||||
func Subage(channel string, username string, streamer string, nb *bot.Bot) {
|
||||
|
||||
ivrResponse, err := ivr.Subage(username, streamer)
|
||||
|
||||
if err != nil {
|
||||
nb.Send(channel, fmt.Sprint(err))
|
||||
return
|
||||
}
|
||||
|
||||
nb.Send(channel, ivrResponse)
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
func Thumbnail(channel string, target string, nb *bot.Bot) {
|
||||
imageHeight := utils.GenerateRandomNumberRange(1040, 1080)
|
||||
imageWidth := utils.GenerateRandomNumberRange(1890, 1920)
|
||||
|
||||
response := fmt.Sprintf("https://static-cdn.jtvnw.net/previews-ttv/live_user_%v-%vx%v.jpg", target, imageWidth, imageHeight)
|
||||
|
||||
nb.Send(channel, response)
|
||||
|
|
|
@ -10,10 +10,12 @@ import (
|
|||
|
||||
func Title(channel string, target string, nb *bot.Bot) {
|
||||
title, err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/channel/%s/title", target))
|
||||
|
||||
if err != nil {
|
||||
nb.Send(channel, "Something went wrong FeelsBadMan")
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
reply := fmt.Sprintf("%s title is: %s", target, title)
|
||||
nb.Send(channel, reply)
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
)
|
||||
|
||||
func Uptime(channel string, name string, nb *bot.Bot) {
|
||||
|
||||
resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/channel/%s/uptime", name))
|
||||
resp,
|
||||
err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/channel/%s/uptime", name))
|
||||
if err != nil {
|
||||
nb.Send(channel, "Something went wrong FeelsBadMan")
|
||||
log.Error(err)
|
||||
|
|
|
@ -7,5 +7,6 @@ import (
|
|||
|
||||
func Userid(channel string, target string, nb *bot.Bot) {
|
||||
reply := ivr.Userid(target)
|
||||
|
||||
nb.Send(channel, reply)
|
||||
}
|
||||
|
|
|
@ -9,12 +9,13 @@ import (
|
|||
)
|
||||
|
||||
func Weather(channel string, location string, nb *bot.Bot) {
|
||||
|
||||
reply, err := aiden.ApiCall(fmt.Sprintf("api/v1/misc/weather/%s", location))
|
||||
|
||||
if err != nil {
|
||||
nb.Send(channel, "Something went wrong FeelsBadMan")
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
nb.Send(channel, reply)
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue