2.9 KiB
2.9 KiB
Sheepstar Core
About The Project
This is the official Sheepstar Core. It was written with java and made to run with the JDA. Have fun during programming your own modules :p
Getting Started
Installation
- Create a new project in your IDE
- Import the dependency from https://jitpack.io/#sheepstar-dc/SheepstarCore
- Create an
.env
folder (or another folder in which you want to load the runtime) - Create a
config.json
file in your.env
folder and replace it to your needs{ "token": "the discord bot token", "api_key": "the key of the sheepstar api", "api_url": "https://api.sheepstar.xyz", "moduleDirectory": "modules", "mysql": { "hostname": "localhost", "username": "username", "password": "password", "database": "database" }, "commands": { "enable_ping_feature": true, "enable_prefix_feature": true, "enable_slash_feature": true, "debug_guild": "guildID / leave empty to set global" }, "permissions": { "BOT_OWNER": [ "357214370188492802", "386242172632170496" ], "SUPPORTER": { "guildID": "846497208086167602", "roleID": "860823465329295380" } }, "activities": [ { "type": "WATCHING", "name": "discord.gg/dAe7BPsHZc" }, { "type": "LISTENING", "name": "/help" }, { "type": "WATCHING", "name": "sheepstar.xyz" } ], "pools": [ { "name": "SR-PreparePool", "cores": 16 }, { "name": "SR-CommandPool", "cores": 8 }, { "name": "SR-ListenerPool", "cores": 8 }, { "name": "SR-ActionPool", "cores": 4 } ] }
- Add a
module.yml
file into your resourcesmain: xyz.sheepstar.exampleModule.Bootstrap # your main class name: example module # your module name author: Mathias Wagner # the name of the author
Optional: Instant reloading (Only works in IntelliJ)
If you want to, you can create a configuration that lets you update the changes directly without restarting (in most cases)
- Go to
Project Settings
>Artifacts
and create a new empty artifact - Add
compile output
into your.jar
file - Change the output directory to the
modules
directory (it should be located in your runtime folder. if not, create one.) - Apply the settings and create a new
Application
-configuration - Change the main-class to
xyz.sheepstar.core.SheepstarCore
- Click on
Modify options
>Add before launch task
>Build artifact
and choose your created artifact - Change the working directory to your runtime folder
- Add
-cf config.json
to your program arguments - Ready! Click on the debug-icon to start your module, make a change and click on the build-icon to try it