From 16dcdf656de08896866f134f2cdc537677ba8689 Mon Sep 17 00:00:00 2001 From: akshtshrma24 Date: Sat, 6 Aug 2022 23:10:10 -0700 Subject: [PATCH] fixed parser --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 2aeaba7..1d3e4a2 100644 --- a/main.go +++ b/main.go @@ -84,7 +84,7 @@ func checkWhURL(whURL string) { log.Fatalf("The Discord WebHook URL doesn't seem to be a valid URL.") } - re := regexp.MustCompile(`https://discord(?:app)?.com/api/webhooks/[0-9]{18}/[a-zA-Z0-9_-]+`) + re := regexp.MustCompile(`https://discord(?:app)?.com/api/webhooks/[0-9]{18,19}/[a-zA-Z0-9_-]+`) if ok := re.Match([]byte(whURL)); !ok { log.Printf("The Discord WebHook URL doesn't seem to be valid.") }