/discord-needle

Needle is a Discord bot that helps you declutter your server by creating Discord threads automatically

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Needle

Needle is a Discord bot that helps you declutter your server by creating Discord threads automatically.

WebsiteInvite NeedleGet Support

👋 Getting started

The easiest way to start using Needle in your server is to use the hosted instance. Click here to invite Needle to your Discord server! If you have any questions, feel free to join the support server and check the Frequently Asked Questions.

🛠️ Self-hosting (advanced)

The hosted instance of Needle is customizeable and should be enough for most users. However, if you have special requirements and want to modify the functionality of Needle, you will have to fork the repository and self-host your own instance. This requires programming knowledge and is only for advanced users - support for this will be limited.

Needle requires an environment with Node.js version 16.9.0 or higher, along with persistent storage for per-server config files - shared hosts (like Replit and Heroku) will not work.

  1. Clone or download the latest release of Needle (branch: stable).
  2. Copy .env.example to .env and fill in your bot's token and application ID.
  3. Run npm install to install Needle's dependencies.
  4. Run npm run build to compile Needle's code.
  5. Run npm run deploy to setup slash commands.
    • Slash commands can take up to one hour to show up in all servers.
  6. Run npm start to start Needle 🎉

Needle requires the following permissions to function, along with the applications.commands and bot scopes.

  • View channels
  • Send messages
  • Send messages in threads
  • Create public threads
  • Read message history

You can use this link to invite your self-hosted version of Needle, replacing <APP ID> with your bot's application ID:

https://discord.com/oauth2/authorize?client_id=<APP ID>&permissions=309237713920&scope=bot%20applications.commands

🐳 Docker

Needle has an official Docker image. Releases are tagged by their minor & patch version (e.g. 2.0.0 & 2.0), with the latest release tagged latest. Branches are tagged by their name. To run the image, write the following command, replacing token with your bot's token:

docker run -d --name Needle --env DISCORD_API_TOKEN=token discord-needle ghcr.io/MarcusOtter/discord-needle:latest

By default, this will create an anonymous volume for /configs. To change the location, add -v /path/to/configs:/configs to the command.

There is also an example docker-compose.yml file.

You'll still need to deploy Needle's slash commands - follow the regular self-hosting instructions apart from step 6.

🤝 Contributing

Contribution guidelines coming soon ™️

Join the Discord if interested!

If you want to support Needle in other ways, consider sponsoring the development of Needle.

You can also vote for and review the bot on top.gg.

📜 License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.