This project is open to anyone who wants to contribute, large or small! Whether you noticed a typo or want to add a whole new feature, go for it!
Large additions should be discussed in issues or on Discord first. If you're new to Golang, ask me on Discord for where to start and you can use CJ as a starting point for a contribution.
To run the app, you need:
- A Discord server to test - you can't use the SA:MP Discord to do tests
- Go 1.11 - no guarantees on older versions
- A Discord bot with the 'Server Members Intent' enabled
- Node.js and npm, to build the admin dashboard's frontend (
web/) - Task, used to run build/test/dev commands (see
Taskfile.yml)
If you don't own/admin a Discord server, creating one is simple, you can do it from the same menu you join discord servers from.
If you want to develop features that require persisting data, spin up a MongoDB database. If you have Docker installed,
this is as simple as running task mongodb which will start a MongoDB container with a user root that has no
password. If you don't have Docker, you'll need to
install MongoDB onto your system..
If you don't need a database for your feature, just add NO_DATABASE=true to .env.
Finally, the application requires some configuration. Copy the example.env to .env and modify it to use your token
and various IDs. Depending on what you're working on, some values won't be necessary.
CJ requests Discord's Message Content Intent by default. If your bot lacks access, set
CJ_DISCORD_MESSAGE_CONTENT_ENABLED=false in .env and restart CJ. Set it back to true and restart
once Discord restores access.
While the setting is off, CJ stops replying to the cj keyword, moderating ads, and logging new messages.
Slash commands, scheduled jobs, and chat history still work.
Join greetings and automatic member cache refresh are off by default. To enable them, turn on
Server Members Intent in the Discord Developer Portal, set CJ_DISCORD_GUILD_MEMBERS_ENABLED=true
in .env, and restart CJ.
Now you can build and run the application with task local.
Thanks goes to these wonderful people (emoji key):
Octavian Dima 💻 🤔 🐛 | J0shES 💻 🤔 🐛 🚧 | Dayvison 💻 | Adrian Graber 💻 | __SyS__ 💻 | Robster 🖋 | Lasha Kanteladze 💻 | |
Kristo Isberg 💻 | Marcel Schramm 💻 | Codeah 💻 | Giampaolo Falqui 📖 | Sunehildeep 💻 | TommyB 🖋 | Nikola Yanakiev 🖋 | coool9 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
