-
Notifications
You must be signed in to change notification settings - Fork 6
Set up Clancy Code
Brendon Miranda edited this page Apr 24, 2022
·
6 revisions
📌 Clone code
📌 Edit properties
- Go to path clancy/src/main/resources
- Open the application.properties file on your favourite text editor (e.g. Notepad++)
- Now, you need to edit it replacing the variables for the values.
application.properties variables | Values / Where you can find the value | Description |
---|---|---|
OWNER | Set up owner id | - |
TOKEN | Set up Discord App | In Set up Discord App there is no need to repeat all the steps. Just look for the step where you get the token from the discord developer portal. |
PREFIX | ! | The prefix you'll use to give commands to the bot on your Discord server. Choose according to your preference. |
INACTIVE_THRESHOLD | 3600000 | Represents how long in milliseconds the bot can stay there without play anything to be considered inactive (3600000 = 1h). Choose according to your preference. |
TASK_INACTIVE_FIXED_DELAY | 3600000 | Represents the period in milliseconds which the bot will sweep the servers in order to disconnect from those considered inactive (3600000 = 1h). Choose according to your preference. |
RABBIT_HOSTNAME | Set up RabbitMQ | - |
RABBIT_USERNAME | Set up RabbitMQ | - |
RABBIT_PASSWORD | Set up RabbitMQ | - |
RABBIT_VIRTUALHOST | Set up RabbitMQ | - |
RABBIT_CONNECTION_TIMEOUT | Set up RabbitMQ | - |
RABBIT_REQUEST_HEARTBEAT | Set up RabbitMQ | - |
RABBIT_QUEUE_TTL | Set up RabbitMQ | - |
📌 After editing your file you should have something like this:
📌 Run it
-
Go back to the root path which is clancy/ and run the following command:
-
For Linux:
./gradlew -x test clean build
-
For Windows:
gradle -x test clean build
-
-
Now you've built the project run the following:
java -jar build/libs/clancy-2.0.1.jar
If everything was fine you should see the logs indicating that the project is up. The bot should be online on your Discord server ready to use 🎉. Now, take a look in Command List to learn the commands to use the bot.