For security reasons, the API is stored in resources/IDS_PRIVATE
which is included in the
.gitignore
. For testing purposes, you will have to create a new discord bot and populate
resources/IDS_PRIVATE
in the format described below. Whitespace on either side of the semicolon
is ignored.
By default, the bot reads resources/IDS_PUBLIC
for public IDs. But for testing the bot on your own server,
you're going to have to change these values. To do this, please copy the file into resources/IDS_PUBLIC_DEV
and
change the values in there. Then, when running the bot on your own server, pass in the command line argument
IDS_PUBLIC_DEV
.
API_KEY : ABCDE.ABCDE
See response-manager/Readme.md
for an explanation on the setup
needed for the ResponseManager
module. This can be ignored if you do not intend test or modify
the ResponseManager
.
The build script is build.gradle.kts
which is written with the Kotlin DSL for
Gradle. You can use the run
build target (gradle run
) for testing and debugging, but
the shadowJar
target is used for deployment. Make sure to also set IDS_PUBLIC_DEV
for Program Arguments.
Discord bots are represented by a Bot
object, which have very limited functionality until modules
are added to it. Modules represent a set of features that the bot will have. See the
IModule
interface for the most generic definition of a module.
When creating a new module, it is recommended that you extend BotModule
or ListenerModule
if
the module is based on receiving events from the JDA instance.
Commands can be added to the bot by calling GeneralCommandModule.addCommands()
. The general
command module instance can be obtained by calling Bot.resolveDependency(GeneralCommandModule)
.
The Command
data class is defined here.
Contributors who have submitted accepted pull requests will be given the Developer role in DotaPack.
It would be appreciated if commits followed the style followed these guidelines, but pull requests may still be accepted even if they do not.
Code style is loosely defined, but it would be appreciated if it matched the existing code. The
only specification I will mention is that the maximum line length is 100
Add Javadocs for all the classes and functions added that are not inherited from another class or interface.
Add a ModuleID
annotation for any new Modules.