grim/wasdead

Clean up some double outputs
draft
2019-05-11, Gary Kramlich
156164f35081
Parents 25c58bcbc247
Children 4448d4b794c1
Clean up some double outputs
--- a/discord/commands.go Sat May 11 22:39:35 2019 -0500
+++ b/discord/commands.go Sat May 11 22:54:27 2019 -0500
@@ -119,10 +119,7 @@
if p != nil && p.Game != nil && p.Game.Type == discordgo.GameTypeStreaming {
uri = p.Game.URL
} else {
- g.client.sendChannel(
- g.msg.ChannelID,
- fmt.Sprintf("%s is not currently streaming", c.Target),
- )
+ return fmt.Errorf("%s is not currently streaming", c.Target)
}
}
}
@@ -187,7 +184,6 @@
err = ctx.Run(&cmd.Globals)
if err != nil {
- c.sendChannel(m.ChannelID, fmt.Sprintf("error: %v", err))
return err
}
--- a/twitch/twitch.go Sat May 11 22:39:35 2019 -0500
+++ b/twitch/twitch.go Sat May 11 22:54:27 2019 -0500
@@ -44,7 +44,7 @@
}
if len(users.Data.Users) <= 0 || len(streams.Data.Streams) <= 0 {
- return presence.Presence{}, fmt.Errorf("user %q not found", username)
+ return presence.Presence{}, fmt.Errorf("%s is not streaming", username)
}
user := users.Data.Users[0]