Discord bot poller
Skill baronguyen001/ai-automation-skills/skills/discord-bot-poller
8 production-tested Claude skills: automation, Gemini cost/structured output, OSS bounty scouting, ML validation.
npx -y skills add baronguyen001/ai-automation-skills --skill discord-bot-pollerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Poll a Discord channel for new messages with a bot token from env and dispatch a handler while honoring REST rate limits. Use when the user asks to watch a Discord channel, trigger automation from Discord messages, or build a lightweight Discord inbox without committing tokens.
SKILL.md
2.3 KB, as published. Nobody here has run it
Discord Bot Poller
Use this skill when an automation job needs to watch one Discord channel and react to new messages without a full gateway bot framework. The helper uses the Discord REST API, stores the last seen message id in memory or a caller-provided value, and honors rate-limit responses.
When to invoke
- User says: "poll a Discord channel", "trigger this from Discord", "watch messages and run a handler".
- The workflow needs a small single-channel inbox, not slash commands or real-time presence.
When NOT to invoke
- The user needs a full interactive bot; use
discord.pyand the Gateway instead. - The bot must receive messages instantly at high volume across many channels.
Concrete example
User input:
Poll my Discord alerts channel and send each new URL into the scraper.
Output:
# Copy assets/poller.py into your project, then:
from poller import poll_forever
def handle(message):
print(message["author"].get("username", "user"), message.get("content", ""))
poll_forever(handle, poll_seconds=5)
The helper reads DISCORD_BOT_TOKEN and DISCORD_CHANNEL_ID from env. Keep channel ids and tokens out of source control; persist last_message_id with [[sqlite-state]] if the poller must resume after restarts.
Pattern to apply
- Use a bot token from env and grant the bot access only to the channel it needs.
- Poll
GET /channels/{channel_id}/messageswithafter=last_message_idto avoid reprocessing. - Dispatch oldest-to-newest so handlers see messages in natural order.
- Honor HTTP 429
retry_afterandX-RateLimit-Reset-Afterbefore the next request. - Persist the last processed message id only after the handler succeeds.
Reference: assets/poller.py.
Source
Distilled from production use across the author's automation projects. v1.0.0. See also: [[sqlite-state]], [[telegram-alerter]], [[rate-limit-budget]].
→ Build the full runnable bot with Trawlkit.