remove extra type annotations

This commit is contained in:
lyx0 2021-10-24 17:52:24 +02:00
parent 95bab02a0d
commit 2451653ec9
27 changed files with 27 additions and 27 deletions

View file

@ -17,7 +17,7 @@ type currencyResponse struct {
}
// Currency returns the exchange rate for a given given amount to another.
func Currency(currAmount string, currFrom string, currTo string) (string, error) {
func Currency(currAmount, currFrom, currTo string) (string, error) {
baseUrl := "https://api.frankfurter.app"
currFromUpper := strings.ToUpper(currFrom)
currToUpper := strings.ToUpper(currTo)

View file

@ -18,7 +18,7 @@ type firstLineApiResponse struct {
// FirstLine returns the first line a given user has sent in a
// given channel.
func FirstLine(channel string, username string) (string, error) {
func FirstLine(channel, username string) (string, error) {
baseUrl := "https://api.ivr.fi/logs/firstmessage"
resp, err := http.Get(fmt.Sprintf("%s/%s/%s", baseUrl, channel, username))

View file

@ -20,7 +20,7 @@ type followageApiResponse struct {
}
// Followage returns the time since a given user followed a given streamer
func Followage(streamer string, username string) (string, error) {
func Followage(streamer, username string) (string, error) {
baseUrl := "https://api.ivr.fi/twitch/subage"
resp, err := http.Get(fmt.Sprintf("%s/%s/%s", baseUrl, username, streamer))

View file

@ -18,7 +18,7 @@ type randomQuoteApiResponse struct {
// FirstLine returns the first line a given user has sent in a
// given channel.
func RandomQuote(channel string, username string) (string, error) {
func RandomQuote(channel, username string) (string, error) {
baseUrl := "https://api.ivr.fi/logs/rq"
resp, err := http.Get(fmt.Sprintf("%s/%s/%s", baseUrl, channel, username))

View file

@ -31,7 +31,7 @@ type subStreak struct {
}
// Subage returns the length a given user has been subscribed to a given channel.
func Subage(username string, channel string) (string, error) {
func Subage(username, channel string) (string, error) {
baseUrl := "https://api.ivr.fi/twitch/subage"
resp, err := http.Get(fmt.Sprintf("%s/%s/%s", baseUrl, username, channel))

View file

@ -8,7 +8,7 @@ import (
log "github.com/sirupsen/logrus"
)
func BotStatus(channel string, name string, nb *bot.Bot) {
func BotStatus(channel, name string, nb *bot.Bot) {
resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/botStatus/%s?includeLimits=1", name))
if err != nil {

View file

@ -6,7 +6,7 @@ import (
"github.com/lyx0/nourybot/cmd/bot"
)
func Bttv(target string, emote string, nb *bot.Bot) {
func Bttv(target, emote string, nb *bot.Bot) {
reply := fmt.Sprintf("https://betterttv.com/emotes/shared/search?query=%s", emote)
nb.Send(target, reply)

View file

@ -6,7 +6,7 @@ import (
"github.com/sirupsen/logrus"
)
func Currency(target string, currAmount string, currFrom string, currTo string, nb *bot.Bot) {
func Currency(target, currAmount, currFrom, currTo string, nb *bot.Bot) {
reply, err := api.Currency(currAmount, currFrom, currTo)
if err != nil {
logrus.Info(err)

View file

@ -2,6 +2,6 @@ package commands
import "github.com/lyx0/nourybot/cmd/bot"
func Echo(channel string, message string, nb *bot.Bot) {
func Echo(channel, message string, nb *bot.Bot) {
nb.Send(channel, message)
}

View file

@ -7,7 +7,7 @@ import (
"github.com/lyx0/nourybot/pkg/api/ivr"
)
func EmoteLookup(channel string, emote string, nb *bot.Bot) {
func EmoteLookup(channel, emote string, nb *bot.Bot) {
reply, err := ivr.EmoteLookup(emote)
if err != nil {

View file

@ -6,7 +6,7 @@ import (
"github.com/lyx0/nourybot/cmd/bot"
)
func Ffz(target string, emote string, nb *bot.Bot) {
func Ffz(target, emote string, nb *bot.Bot) {
reply := fmt.Sprintf("https://www.frankerfacez.com/emoticons/?q=%s", emote)
nb.Send(target, reply)

View file

@ -7,7 +7,7 @@ import (
"github.com/lyx0/nourybot/cmd/bot"
)
func Fill(channel string, emote string, nb *bot.Bot) {
func Fill(channel, emote string, nb *bot.Bot) {
if emote[0] == '.' || emote[0] == '/' {
nb.Send(channel, ":tf:")
return

View file

@ -7,7 +7,7 @@ import (
"github.com/lyx0/nourybot/pkg/api/ivr"
)
func Firstline(channel string, streamer string, username string, nb *bot.Bot) {
func Firstline(channel, streamer, username string, nb *bot.Bot) {
ivrResponse, err := ivr.FirstLine(streamer, username)
if err != nil {

View file

@ -7,7 +7,7 @@ import (
"github.com/lyx0/nourybot/pkg/api/ivr"
)
func Followage(channel string, streamer string, username string, nb *bot.Bot) {
func Followage(channel, streamer, username string, nb *bot.Bot) {
ivrResponse, err := ivr.Followage(streamer, username)
if err != nil {

View file

@ -8,7 +8,7 @@ import (
log "github.com/sirupsen/logrus"
)
func Game(channel string, name string, nb *bot.Bot) {
func Game(channel, name string, nb *bot.Bot) {
game, err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/channel/%s/game", name))
if err != nil {

View file

@ -6,7 +6,7 @@ import (
"github.com/lyx0/nourybot/cmd/bot"
)
func Godocs(channel string, searchTerm string, nb *bot.Bot) {
func Godocs(channel, searchTerm string, nb *bot.Bot) {
resp := fmt.Sprintf("https://godocs.io/?q=%s", searchTerm)
nb.Send(channel, resp)

View file

@ -11,7 +11,7 @@ func RandomNumber(channel string, nb *bot.Bot) {
nb.Send(channel, string(reply))
}
func Number(channel string, number string, nb *bot.Bot) {
func Number(channel, number string, nb *bot.Bot) {
reply := api.Number(number)
nb.Send(channel, string(reply))

View file

@ -6,7 +6,7 @@ import (
"github.com/lyx0/nourybot/cmd/bot"
)
func Pingme(channel string, user string, nb *bot.Bot) {
func Pingme(channel, user string, nb *bot.Bot) {
response := fmt.Sprintf("@%s", user)
nb.Send(channel, response)

View file

@ -7,7 +7,7 @@ import (
"github.com/lyx0/nourybot/pkg/api/ivr"
)
func ProfilePicture(channel string, target string, nb *bot.Bot) {
func ProfilePicture(channel, target string, nb *bot.Bot) {
reply, err := ivr.ProfilePicture(target)
if err != nil {

View file

@ -8,7 +8,7 @@ import (
"github.com/lyx0/nourybot/cmd/bot"
)
func Pyramid(channel string, size string, emote string, nb *bot.Bot) {
func Pyramid(channel, size, emote string, nb *bot.Bot) {
if size[0] == '.' || size[0] == '/' {
nb.Send(channel, ":tf:")
return

View file

@ -7,7 +7,7 @@ import (
"github.com/lyx0/nourybot/pkg/api/ivr"
)
func RandomQuote(channel string, target string, username string, nb *bot.Bot) {
func RandomQuote(channel, target, username string, nb *bot.Bot) {
ivrResponse, err := ivr.RandomQuote(target, username)
if err != nil {

View file

@ -7,7 +7,7 @@ import (
"github.com/lyx0/nourybot/pkg/api/ivr"
)
func Subage(channel string, username string, streamer string, nb *bot.Bot) {
func Subage(channel, username, streamer string, nb *bot.Bot) {
ivrResponse, err := ivr.Subage(username, streamer)
if err != nil {

View file

@ -7,7 +7,7 @@ import (
"github.com/lyx0/nourybot/pkg/utils"
)
func Thumbnail(channel string, target string, nb *bot.Bot) {
func Thumbnail(channel, target string, nb *bot.Bot) {
imageHeight := utils.GenerateRandomNumberRange(1040, 1080)
imageWidth := utils.GenerateRandomNumberRange(1890, 1920)

View file

@ -8,7 +8,7 @@ import (
log "github.com/sirupsen/logrus"
)
func Title(channel string, target string, nb *bot.Bot) {
func Title(channel, target string, nb *bot.Bot) {
title, err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/channel/%s/title", target))
if err != nil {

View file

@ -8,7 +8,7 @@ import (
log "github.com/sirupsen/logrus"
)
func Uptime(channel string, name string, nb *bot.Bot) {
func Uptime(channel, name string, nb *bot.Bot) {
resp, err := aiden.ApiCall(fmt.Sprintf("api/v1/twitch/channel/%s/uptime", name))
if err != nil {

View file

@ -5,7 +5,7 @@ import (
"github.com/lyx0/nourybot/pkg/api/ivr"
)
func Userid(channel string, target string, nb *bot.Bot) {
func Userid(channel, target string, nb *bot.Bot) {
reply := ivr.Userid(target)
nb.Send(channel, reply)

View file

@ -8,7 +8,7 @@ import (
log "github.com/sirupsen/logrus"
)
func Weather(channel string, location string, nb *bot.Bot) {
func Weather(channel, location string, nb *bot.Bot) {
reply, err := aiden.ApiCall(fmt.Sprintf("api/v1/misc/weather/%s", location))
if err != nil {