Archived
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
.envfolder (or another folder in which you want to load the runtime) - Create a
config.jsonfile in your.envfolder 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.ymlfile 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>Artifactsand create a new empty artifact - Add
compile outputinto your.jarfile - Change the output directory to the
modulesdirectory (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 artifactand choose your created artifact - Change the working directory to your runtime folder
- Add
-cf config.jsonto 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