-
Notifications
You must be signed in to change notification settings - Fork 2
Getting Started
RyanLand edited this page Nov 7, 2024
·
7 revisions
New to Colossus? Here is a guide to get you started.
- Create a Discord bot application on the Developer Portal.
- Add a bot
- Save the token
- Add it to your server (if you specify the guild ID in your config, Colossus will generate an invite link automatically)
- Java 17
- Project with Gradle/Maven
- An IDE (IntelliJ IDEA recommended)
You can install Colossus inside of your project using a dependency manager, as seen below:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.RyanLandDev:Colossus:VERSION'
}
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.RyanLandDev</groupId>
<artifactId>Colossus</artifactId>
<version>VERSION</version>
</dependency>
Create a ColossusBuilder
to set up your bot.
The ColossusBuilder
class contains methods to define all kinds of properties for your bot.
Colossus bot = new ColossusBuilder() // the default constructor -- creates a `config.json` file in your root project directory. Use another constructor for other configuration setups.
.scanPackage("dev.ryanland.firstbot") // scans the entire project for commands, database entities and listeners, registering them automatically
.build();
bot.initialize(); // initialize the bot