mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
cleanup
This commit is contained in:
parent
9a4a3d2874
commit
4dcef064b6
2 changed files with 3 additions and 1 deletions
|
@ -39,6 +39,7 @@ type currencyResponse struct {
|
|||
|
||||
// https://api.frankfurter.app/latest?amount=10&from=gbp&to=usd
|
||||
|
||||
// Currency returns the exchange rate for a given given amount to another.
|
||||
func Currency(currAmount string, currFrom string, currTo string) (string, error) {
|
||||
baseUrl := "https://api.frankfurter.app"
|
||||
currFromUpper := strings.ToUpper(currFrom)
|
||||
|
|
|
@ -70,13 +70,14 @@ func Command(message twitch.PrivateMessage, nb *bot.Bot) {
|
|||
commands.Color(message, nb)
|
||||
return
|
||||
|
||||
// ()currency 10 gbp to usd
|
||||
case "currency":
|
||||
if msgLen <= 4 {
|
||||
nb.Send(target, "Usage: ()currency 10 usd to eur, only 3 letter codes work.")
|
||||
return
|
||||
}
|
||||
commands.Currency(target, cmdParams[1], cmdParams[2], cmdParams[4], nb)
|
||||
return
|
||||
|
||||
case "echo":
|
||||
commands.Echo(target, message.Message[7:len(message.Message)], nb)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue