A Discord bot to redirect discussions to threads in "media-only" channels
Find a file
Heni b2ba25eb2b
All checks were successful
CI/CD / build-and-push (push) Successful in 6s
fix: move from 7 days to one hour for ban delete
2025-11-12 13:43:59 -06:00
.github/workflows add ci/cd workflow 2025-11-10 22:49:58 -06:00
.gitignore feat: add incinerator feature 2025-11-12 13:21:37 -06:00
deno.jsonc fix: add permissions 2025-11-12 13:24:16 -06:00
deno.lock feat: Add configurable logging and update docs 2025-09-17 18:56:41 -05:00
LICENSE.md feat: add incinerator feature 2025-11-12 13:21:37 -06:00
main.ts fix: move from 7 days to one hour for ban delete 2025-11-12 13:43:59 -06:00
README.md fix: move from 7 days to one hour for ban delete 2025-11-12 13:43:59 -06:00

No Chatter

No Chatter is a powerful and intuitive Discord bot designed to keep your media-only channels pristine. It intelligently detects text-only messages in designated channels and automatically moves them into organized discussion threads, ensuring your media remains the star of the show.

It can also perform anti-spam tasks with an "incinerator" channel to bait self-bot scripts into posting into a channel that bans anyone who posts there on sight.

Features

  • Automatic Thread Creation: No Chatter automatically creates a new thread for any text-based discussion, keeping your media channels clean and focused.
  • PluralKit Integration: The bot is designed to work seamlessly with PluralKit, correctly identifying and moving messages from proxied accounts.
  • Configurable: You can easily configure which channels the bot should monitor by adding their IDs to the channels.json file.
  • User-Friendly Notifications: When a message is moved, the bot sends a direct message to the user, letting them know where to find their message and continue the conversation.
  • Optional anti-spam "Incinerator": When a message is detected in a channel within incinerator.json the user posting that message is instantly banned and their messages in the past one hour deleted. It's highly suggested to warn your users if enabling this optional feature. The intent is to catch spammers in their tracks as their self-bot scripts don't read channel contents before posting.

Prerequisites

  • Deno runtime installed on your system.
  • A Discord bot token with the following intents:
    • Guilds
    • GuildMessages
    • MessageContent
  • The following permissions for the bot assigned as needed:
    • Create Public Threads
    • Create Private Threads
    • Manage Channels
    • Manage Messages
    • Moderate Members
    • Ban Members

Note: which permissions are necessary depend on which features you choose to use.

Installation

  1. Clone the repository:
    git clone https://git.glomp.ai/heni/no-chatter.git
    cd no-chatter
    

Configuration

Before running the bot, you need to configure it by setting up environment variables and specifying the channels to monitor.

1. Environment Variables

Create a .env file in the root of the project. This file is used to store sensitive information like API tokens.

BOT_TOKEN=your_bot_token_here
PK_TOKEN=your_pluralkit_token_here
LOG_LEVEL=info
  • BOT_TOKEN (required): Your Discord bot token.
  • PK_TOKEN (optional): Your PluralKit token. This is recommended to avoid rate limits when interacting with the PluralKit API.
  • LOG_LEVEL (optional): Sets the logging verbosity. Can be one of trace, debug, info, warn, error, or fatal. Defaults to info.

2. Media-only channel Configuration (optional)

Create a channels.json file in the root of the project. Add the IDs of the text channels you want the bot to monitor for media-only content.

[
    "channel_id_1",
    "channel_id_2"
]

3. Incinerator Configuration (optional)

Create an incinerator.json file in the root of the project. Add the IDs of the text channels you want the bot to monitor for anti-spam purposes.

[
    "channel_id_1",
    "channel_id_2"
]

Usage

To start the bot, run the following command in the project root:

deno task start

Deployment

For easier deployment, you can compile the bot into a single executable using the prepare task. This will create a file named no-chatter in the project root.

deno task prepare

Once the executable is created, you can run it directly:

./no-chatter

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

License

This project is licensed under the AGPL-3.0 License. See the LICENSE file for details.