Fixed regex for xkcd comic selection.

pull/20/head
pocketjawa 2020-05-01 00:08:14 -04:00
parent 3d6d093e87
commit 1f9dc16e3e
1 changed files with 1 additions and 1 deletions

View File

@ -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 {