commands/join: allow different invite hash lengths
This commit is contained in:
@@ -117,7 +117,7 @@ var cmdJoin = &commands.FullHandler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var usernameLinkRe = regexp.MustCompile(`^(?:(?:https?://)?t(?:elegram)?\.(?:me|dog)/|tg:/{0,2}resolve\?domain=)([a-zA-Z]\w{3,30}[a-zA-Z\d])(?:\?.+)?$`)
|
var usernameLinkRe = regexp.MustCompile(`^(?:(?:https?://)?t(?:elegram)?\.(?:me|dog)/|tg:/{0,2}resolve\?domain=)([a-zA-Z]\w{3,30}[a-zA-Z\d])(?:\?.+)?$`)
|
||||||
var inviteLinkRe = regexp.MustCompile(`^(?:(?:https?://)?t(?:elegram)?\.(?:me|dog)/(?:joinchat/|\+)|tg:/{0,2}join\?invite=)([a-zA-Z0-9_-]{22})(?:\?.+)?$`)
|
var inviteLinkRe = regexp.MustCompile(`^(?:(?:https?://)?t(?:elegram)?\.(?:me|dog)/(?:joinchat/|\+)|tg:/{0,2}join\?invite=)([a-zA-Z0-9_-]{8,64})(?:\?.+)?$`)
|
||||||
|
|
||||||
func fnJoin(ce *commands.Event) {
|
func fnJoin(ce *commands.Event) {
|
||||||
if len(ce.Args) == 0 || len(ce.Args) > 2 {
|
if len(ce.Args) == 0 || len(ce.Args) > 2 {
|
||||||
|
|||||||
Reference in New Issue
Block a user