Ratelimiter
A simple-to-use Golang library for gotgbot to rate-limit users and avoid spamming requests to your Telegram bot.
Install / Use
/learn @AnimeKaizoku/RatelimiterREADME
<p align="center"> Rate Limiter - gotgbot </p>
<p align="center"> <a href="https://github.com/AnimeKaizoku/ratelimiter"> <img src="./logo.png" alt="ratelimiter-Logo"> </a> </p><hr/>Name: Rate Limiter
Version: v1.0.7
Edit: 2 Feb 2021
By: ALiwoto and Contributors (C)
How to use
import "github.com/AnimeKaizoku/ratelimiter/ratelimiter"
func loadLimiter(d *ext.Dispatcher) {
limiter = ratelimiter.NewLimiter(d, &ratelimiter.LimiterConfig{
ConsiderChannel: false,
ConsiderUser: true,
ConsiderEdits: false,
IgnoreMediaGroup: true,
TextOnly: false,
HandlerGroups: []int{0, 1, 2},
})
// 14 messages per 6 seconds
limiter.SetFloodWaitTime(6 * time.Second)
limiter.SetMaxMessageCount(14)
// add sudo users as exceptions, so they don't get rate-limited by library
limiter.AddExceptionID(sudoUsers...)
limiter.Start()
}
<hr/>
Helpful links:
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
349.2kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
