diff --git a/telegram/channels.go b/telegram/channels.go index d37a8a38..90c86358 100755 --- a/telegram/channels.go +++ b/telegram/channels.go @@ -58,7 +58,7 @@ func (c *Client) JoinChannel(Channel any) error { switch p := Channel.(type) { case string: if TG_JOIN_RE.MatchString(p) { - _, err := c.MessagesImportChatInvite(TG_JOIN_RE.FindStringSubmatch(p)[2]) + _, err := c.MessagesImportChatInvite(TG_JOIN_RE.FindStringSubmatch(p)[1]) if err != nil { return err }