diff --git a/network.go b/network.go index 8d829d3..1c3aa0a 100644 --- a/network.go +++ b/network.go @@ -40,10 +40,6 @@ type client struct { gl *rate.Limiter // global limiter } -const ( - globalRateLimit = 30 -) - var lclient = newClient() func newClient() client { @@ -63,7 +59,7 @@ func (c client) wait(chatID string) error { // If no limiter exists for a chat, create one. l, ok := c.cl[chatID] if !ok { - l = rate.NewLimiter(rate.Every(time.Minute/20), 10) + l = rate.NewLimiter(rate.Every(time.Minute/20), 1) c.cl[chatID] = l } @@ -336,7 +332,3 @@ func (c client) sendStickers(url string, stickers ...InputSticker) (res []byte, } return c.doGet(url) } - -func isGroup(chatID string) bool { - return strings.HasPrefix(chatID, "-") -}