agentsclimarketplace

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.

Install
npx -y skills add baronguyen001/ai-automation-skills --skill discord-bot-poller

Assembled 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.py and 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

  1. Use a bot token from env and grant the bot access only to the channel it needs.
  2. Poll GET /channels/{channel_id}/messages with after=last_message_id to avoid reprocessing.
  3. Dispatch oldest-to-newest so handlers see messages in natural order.
  4. Honor HTTP 429 retry_after and X-RateLimit-Reset-After before the next request.
  5. 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.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.