This is the Discord bot for the LearnSpigot Discord Server. LearnSpigot is the most sold Minecraft course in the world, and this bot aids the provision of exclusive support for all students in the server.
This bot powers systems such as verification, tickets and suggestions.
Written in Kotlin/JVM. Using Gradle (Kotlin DSL) build tool.
- JDA (Java Discord API)
- MongoDB Java Driver (Database)
- Neptune (Command framework)
Contributions are always welcome. If you have no coding knowledge, please create an issue in the Issues tab so we can track it. Otherwise, please use the following steps to begin contributing to the code:
- Fork the repository, and then clone it to your local git
- Open the project in your IDE of choice
- We use environment variables for sensitive data such as Mongo URI's and bot tokens, as well as constants such as channel IDs or role IDs. You will see an .env.example in the root folder. You should rename this to .env, and populate it
- Make your changes, and please maintain a similar code style and quality
- Create a Pull Request into the master branch of this repository
We review pull requests as soon as possible. Please feel free to get in touch if it's urgent.
If you are an active contributor or close to the Flyte team, you may be offered access to the official LearnSpigot bot testing server where preconfigured .env files are provided with bot tokens and a database. Otherwise, all the tools are provided to work locally.
- Familiarise yourself with all the classes sitting in the main directory (com/learnspigot/bot)
- Use
Main.ktto run the bot - Use
Registryobject to access registries such as for profiles, counting, help posts, etc. - Use
Serverobject to find/add any values from the .env or add server-specific methods & constants - Use
Botto configure the bots initialisation
- Use
- Adding a command:
- We use the Lamp command framework for commands.
- In any class, declare a command using lamp and then add it to the list of commands in the
Botclass. - Feel free to look at any other command in the repository for a template if you are unsure of how best to use Lamp.
- Adding an EventListener
- Create a class extending the
ListenerAdapterclass from JDA. - Override the event functions you need to listen to and add your implementation.
- Add your event to the list of events in the
Botclass - As above, look to other listeners in the repository to see how to do this if you are unsure.
- Create a class extending the
