Spellscord is a Discord bot powered by Groq's powerful LLM, designed to pop out of nowhere and provide relevant correction to messages containing spelling mistakes.
- Customizable System Prompt: Localize in your langage and tweak the system prompt to fit your needs.
- Event-Driven Architecture: Spellscord utilizes Discord.js events to efficiently handle interactions, commands, and incoming messages.
- Configuration Options: Basic configuration settings are available in
config.json
: you can easily configure on which channels, channel categories, user roles, the bot will be active. You also can configure which LLMs are used and specify a custom localization.
- Node.js: Version 18 or later (https://nodejs.org/).
- pnpm: Package manager (https://pnpm.io/).
- Discord Bot Token: Obtain a bot token from the Discord Developer Portal (https://discord.com/developers/applications).
- Groq API Key: Create an account and get your API key from Groq (https://console.groq.com/).
-
Clone the Repository:
git clone https://github.com/Truiteseche/spellscord.git cd spellscord
-
Install Dependencies:
pnpm install
-
Environment Variables: Create a
.env
file in the root directory and add the following:GUILD_ID = CLIENT_ID = GROQ_API_KEY = DISCORD_TOKEN =
-
Configuration: Adjust settings in
config.json
:localization
: The langage that the bot uses. (You can add your own translations)channelCategories
: Channel 'categories' of the guild where the bot will be activechannelsToIgnore
: Channels to ignore in those categoriesconsideredRoles
: The bot will react only to users with those roles- and some other useful options you can tweak (check out
config.json
)
-
Build and Run:
pnpm run build # Compiles TypeScript code pnpm run dev # Watch for code edits, compiles and run in realtime pnpm run main # Starts the bot for prod
- Invite Spellscord to your Server: Generate an invite link from the Discord Developer Portal for your bot.
- Interact with Spellscord: Once Spellscord is in your server and active in the configured categories, send messages in those channels to initiate conversations.
- Developer Commands: Use the
/debug
slash command for testing and troubleshooting.
- System Prompt: Edit
src/locales/<localization>/translation.ts
to refine Spellscord' responses:- Modify the system context, guidelines, and few-shots to align with your needs.
- Configure Spellscord's behavior: Edit
config.json
and adapt Spellscord's behavior and rules of engagement to your needs. - Commands and Events: Extend Spellscord's functionality by creating new commands in
src/commands
and events insrc/events
.
Contributions are welcome! Please open issues for bug reports or feature requests. Feel free to submit pull requests for code enhancements or bug fixes.
This project is licensed under the GNU General Public License v3.0.