|
|
||
|---|---|---|
| .github/workflows | ||
| .gitignore | ||
| deno.jsonc | ||
| deno.lock | ||
| LICENSE.md | ||
| main.ts | ||
| README.md | ||
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.jsonfile. - 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.jsonthe 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:
GuildsGuildMessagesMessageContent
- 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
- 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 oftrace,debug,info,warn,error, orfatal. Defaults toinfo.
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.