Fixed regex for xkcd comic selection.
parent
3d6d093e87
commit
1f9dc16e3e
|
@ -103,7 +103,7 @@ func getXKCD(s *discordgo.Session, m *discordgo.Message, ctx *mux.Context) {
|
|||
} else {
|
||||
arg = "random"
|
||||
}
|
||||
matchedNum, _ := regexp.MatchString(`[0-9]+`, arg)
|
||||
matchedNum, _ := regexp.MatchString(`^[0-9]+$`, arg)
|
||||
if arg == "latest" {
|
||||
comic, err = xkclient.Latest(context.Background())
|
||||
} else if matchedNum {
|
||||
|
|
Loading…
Reference in New Issue