Welcome to PapeBot, a smart moderation bot designed exclusively for PapeSan's Twitch channel, with seamless integration between Discord and Twitch.
It empowers moderators to manage Twitch chat directly from Discord, trigger automated announcements, and much more!
- ๐ค Discord & Twitch Integration โ Manage Twitch from Discord
- โ Ban, Unban, Timeout, Warn โ Full moderation control from Discord
โ ๏ธ Warning System โ Send alerts to users with/warn- ๐ User Lookup โ View Twitch user info, status, moderation buttons
- ๐ฌ Create Clips โ Capture live moments instantly
- ๐ Auto Announcements โ Periodic Twitch messages only when live
- ๐ Timezone Setup โ Set local time for Twitch chat
- ๐ข Live Detection โ Sends Discord + Twitch alert when stream starts
- ๐ Dynamic Config โ
/configto change announcement channel - ๐ฃ Message Command โ Send a Twitch chat message via official API
- ๐ก๏ธ Blacklist System โ Auto timeout users every 14 days with
/blacklist - ๐๏ธ Unblacklist Command โ Remove users from auto timeout with
/unblacklist - ๐ List Blacklisted Users โ See all users currently blacklisted with
/liste-blacklist - ๐ฌ Twitch Custom Commands โ Manage custom chat commands directly from Discord
- Node.js โ JavaScript backend runtime
- Discord.js โ Discord bot framework
- Twitch Helix API โ Official Twitch integration
- dotenv โ Manage secrets and tokens securely
- axios โ Handle all API requests
- tmi.js โ Twitch IRC client (legacy support)
- moment-timezone โ Handle timezones and formatting
PapeBot/
โโโ commands/ # Slash commands (ban, timeout, warn, user, blacklist, etc.)
โ โโโ announce.js
โ โโโ ban.js
โ โโโ blacklist.js
โ โโโ clips.js
โ โโโ config.js
โ โโโ heure.js
โ โโโ listAnnouncements.js
โ โโโ listBlacklist.js
โ โโโ listCommands.js
โ โโโ message.js
โ โโโ timeout.js
โ โโโ unban.js
โ โโโ unblacklist.js
โ โโโ untimeout.js
โ โโโ user.js
โ โโโ warn.js
โโโ utils/ # Utility functions (Twitch & Discord integration)
โ โโโ banUser.js
โ โโโ blacklistManager.js
โ โโโ createClip.js
โ โโโ createEmbed.js
โ โโโ customCommands.js
โ โโโ getModeratorId.js
โ โโโ getTimezone.js
โ โโโ getUserIdFromTwitch.js
โ โโโ liveWatcher.js
โ โโโ sendChatMessage.js
โ โโโ sendMessage.js
โ โโโ setTimezone.js
โ โโโ timeoutUser.js
โ โโโ unbanUser.js
โ โโโ warnUser.js
โโโ blacklistedUsers.json # Stores blacklisted users and their timers
โโโ customCommands.json # Stores customs commands
โโโ userTimezones.json # Stores timezone info
โโโ config.json # Discord announce channel config
โโโ .env # Environment variables (not committed)
โโโ bot.js # Main bot entry point
git clone https://github.com/notelyoo/PapeBot.git
cd PapeBotcd backend
npm installDISCORD_TOKEN=your-discord-bot-token
TWITCH_CHANNEL=your-twitch-channel
TWITCH_BOT_USERNAME=your-twitch-bot-account
TWITCH_OAUTH_TOKEN=your-user-access-token-with-scopes
TWITCH_CLIENT_ID=your-client-id
TWITCH_CLIENT_SECRET=your-client-secretRequired Twitch scopes:
user:write:chat,clips:edit,moderator:manage:banned_usersYou can use Twitch Token Generator to create your token and choose your scopes.
node bot.js| Command | Description |
|---|---|
/ban <user> <reason> |
Ban a Twitch user permanently |
/unban <user> |
Unban a previously banned user |
/timeout <user> <duration> <reason> |
Timeout user in seconds |
/untimeout <user> |
Lift an active timeout |
/warn <user> <message> |
Send a warning message |
/blacklist <pseudo> |
Blacklist a user (auto timeout every 14 days) |
/unblacklist <pseudo> |
Remove a user from the blacklist |
| Command | Description |
|---|---|
/user <pseudo> |
Show Twitch user profile & mod actions |
/clips |
Create a Twitch clip (live only) |
/heure <timezone> |
Set the bot's timezone (e.g., Europe/Paris) |
/config channel |
Set the Discord channel for live announcements |
/liste |
View and stop periodic announcements |
/liste-commandes |
View all custom Twitch chat commands |
/liste-blacklist |
View blacklisted users |
/annonce <message> <interval> |
Schedule a periodic message if live |
/message <message> |
Send one message in Twitch chat via API |
- PapeBot checks Twitch live status every 30 seconds.
- When the live starts:
- โ๏ธ Embed sent in the configured Discord channel.
- ๐ฌ Message in Twitch chat: "Le live vient de commencer. Bienvenue ร tous !"
- When the live ends:
- ๐ด Message: "Le live est terminรฉ. Merci d'avoir รฉtรฉ prรฉsents ๐"
- All periodic announcements are paused automatically.
Contributions are welcome!
Feel free to fork the project, create a branch, and submit a pull request.
All contributions must comply with the AGPLv3 license.
Licensed under GNU AGPLv3 โ free to use, modify, and share publicly under the same license.
See LICENSE for full details.
- ๐ง Email: contact@miyeon.fr
- ๐๏ธ Twitter: @NotElyoo
- ๐บ Twitch Bot: @NotElyoo
- ๐บ Twitch Channel: @PapeSan