A production-ready automation that assigns roles in Discord based on reactions, buttons, emojis, keywords, or onboarding events — with both native bot logic and Android device automation for mobile-first servers. It reduces moderator workload, enforces rules consistently, and scales role management across multiple servers and accounts.
Created by Appilot, built to showcase our approach to Automation!
If you are looking for custom Discord Role Assignment Bot, you've just found your team — Let’s Chat.👆👆
This system handles automated role assignment on Discord using hybrid execution: native Discord bot APIs for precision and Android automation for mobile-only flows (buttons, reactions, ephemeral modals, captive portals).
It eliminates manual moderator work across large servers, ensuring members are tagged into correct roles instantly and safely at scale.
Businesses and communities gain reliable onboarding, targeted access control, and analytics-ready logs.
- Assign roles via reactions, buttons, select menus, or keyword triggers with rate-limit-aware workers.
- Mobile-first flows supported via Android automation (UI Automator/Appium) when APIs are restricted or UX is mobile-only.
- Multi-server orchestration with per-guild rules, web dashboard, and audit logs.
- Zero-downtime rolling updates, retry queues, and granular failure alerts for reliability.
- Real Devices and Emulators: Run flows on real Android phones or emulators (Bluestacks/Nox/Firebase Test Lab) to handle mobile-only Discord interactions, CAPTCHA gates, and device-bound challenges.
- No-ADB Wireless Automation: Control devices over Wi-Fi without persistent ADB pairing; resilient reconnects and encrypted channels minimize detection.
- Mimicking Human Behavior: Randomized delays, gesture curves, scroll physics, and input jitter to emulate real users during mobile role flows.
- Multiple Accounts Support: Safely manage multiple bot tokens or device profiles with isolated containers, cookies, and secrets vault.
- Multi-Device Integration: Parallel device farm with job queues so multiple guilds and flows execute simultaneously.
- Exponential Growth for Your Account: Automated onboarding funnels, interest-based role menus, and timely nudges improve engagement and retention.
- Premium Support: Priority triage, SLA-backed updates, and hands-on integration for custom role logic and dashboards.
| Feature | Description |
|---|---|
| Reaction Role Mapping | Define emoji→role or button→role rules per channel with conflict resolution and default fallbacks. |
| Slash Command & Panel Builder | /roles create, /roles sync, /roles panel to generate interactive role menus and synchronize guild configs. |
| Onboarding & Verification Rules | Gated roles after rules-ack, keyword passphrases, quiz-like flows, or timed probation roles. |
| Webhook & SIEM Audit Logs | Structured JSON logs to webhooks/ELK/Splunk; includes member, role, ruleId, deviceId, latency. |
| Scheduler & Retry Queues | Exponential backoff for Discord 429s, idempotent handlers, and dedup to avoid double assignments. |
| Proxy & Fingerprint Manager | Per-device proxies and fingerprint isolation for Android automation sessions. |
- Input or Trigger — From the Appilot dashboard you configure guilds, channels, and rules (emoji/button/keyword), then start jobs for API-mode or Android-mode execution.
- Core Logic — The worker consumes events (message/reaction/interaction) and either calls Discord APIs (assign/remove role) or drives an Android device via UI Automator/Appium to press buttons, react, or navigate panels.
- Output or Action — Roles are added/removed, confirmations are sent, and webhooks receive structured logs. Optional DM receipts or channel acknowledgements are posted.
- Other functionalities — Automatic retries on 429/5xx, circuit breakers, healthchecks, per-guild rate ceilings, screenshot logging for Android sessions, and parallel processing across device pools.
- Language: Kotlin, Java, Python, JavaScript/TypeScript
- Frameworks: Appium, UI Automator, Espresso, Robot Framework, Cucumber
- Tools: Appilot, Android Debug Bridge (ADB), Appium Inspector, Bluestacks, Nox Player, Scrcpy, Firebase Test Lab, Accessibility
- Infrastructure: Dockerized device farms, Cloud-based emulators, Proxy networks, Parallel Device Execution, Task Queues, Real device farm
discord-role-assignment-bot/
│
├── android/
│ ├── uiautomator/
│ │ ├── src/main/java/com/appilot/discord/RoleFlowTest.kt
│ │ └── src/main/resources/device-profiles.yaml
│ ├── appium/
│ │ ├── capabilities.json
│ │ └── flows/
│ │ ├── react_to_message.robot
│ │ └── press_button.robot
│ └── accessibility/
│ └── overlays/
│ └── selector_maps.yaml
│
├── bot/
│ ├── src/
│ │ ├── index.ts
│ │ ├── commands/
│ │ │ ├── roles.ts
│ │ │ └── admin.ts
│ │ ├── events/
│ │ │ ├── messageCreate.ts
│ │ │ └── interactionCreate.ts
│ │ └── services/
│ │ ├── roleService.ts
│ │ ├── rulesEngine.ts
│ │ └── audit.ts
│ ├── package.json
│ └── tsconfig.json
│
├── dashboard/
│ ├── src/
│ │ ├── App.tsx
│ │ ├── pages/Guilds.tsx
│ │ └── components/RuleEditor.tsx
│ └── vite.config.ts
│
├── orchestrator/
│ ├── worker.py
│ ├── scheduler.py
│ └── queue.yaml
│
├── config/
│ ├── guild-rules.yaml
│ ├── secrets.env
│ └── proxies.yaml
│
├── logs/
│ ├── bot.log
│ └── android/
│ └── session-2025-11-01.log
│
├── output/
│ ├── audit.jsonl
│ └── screenshots/
│ └── evidence.png
│
├── docker/
│ ├── Dockerfile.bot
│ └── compose.yml
│
├── requirements.txt
├── package.json
└── README.md
- Community managers use it to auto-assign interest roles from reaction menus, so they can segment announcements and increase engagement.
- Education servers use it to gate course roles after rule-ack or quiz steps, so they can control access without manual checks.
- Gaming clans use it to grant faction/class roles via buttons, so they can onboard new members during peak events reliably.
- Brands & events use it to deliver region/language roles via keywords, so they can target updates and reduce churn.
How do I configure this automation for multiple accounts?
Provide multiple bot tokens and/or device profiles in secrets.env and device-profiles.yaml. The orchestrator isolates workers per token/device and enforces per-guild rate ceilings.
Does it support proxy rotation or anti-detection?
Yes. Android sessions can pin per-device proxies and rotate by pool; API-mode respects Discord rate limits with jittered schedules and randomized action windows.
Can I schedule it to run periodically?
Use the scheduler to publish maintenance tasks (cleanup, resync, panel refresh) and time-bound role grants (temporary roles with TTL).
What if a member removes their reaction?
Rules can include symmetric removal: on reaction remove or button toggle, the role is withdrawn with audit logging.
Is there a dashboard?
Yes. A React dashboard manages guild configs, rule mappings, test-run previews, and live status of device/API workers.
- Execution Speed: Assigns roles from queued interactions in <300ms via API mode; Android-mode actions complete in 2–5s including navigation and evidence screenshot.
- Success Rate: End-to-end automated role assignment succeeds 95% across mixed API/Android flows with retries enabled.
- Scalability: Horizontally scales to 300–1000 Android devices and 100+ bot tokens with sharded queues and per-guild backpressure.
- Resource Efficiency: Lightweight workers (<80MB RSS) with async I/O; device sessions recycled by lifecycle hooks to prevent memory leaks.
- Error Handling: Exponential backoff on 429/5xx, idempotent handlers, circuit breakers, dead-letter queues, and webhook alerts with structured context.