Copy the file sample-config.yml
from the main resources directory into the root directory of the bot.
Insert your bot Token. (Make sure to not accidentally push this file to Git in order to keep your Bot-Token secret!)
Add any necessary missing configurations.
Run the bot with the argument -c path/to/your/configuration.yml
.
See Issue #7 for further reference.
Please see the section Found a bug?
for any further problems that are not listed here.
If you have an idea for a new feature please feel free to create a new issue.
Mark the issue as enhancement
.
In your issue please try to include:
- What does the new feature do?
- How does this feature benefit the server?
- An example of usage or something similar.
Even if you cannot provide all points still create an issue. Those points just help better describing your feature, meaning it is better to discuss for other contributors.
Best practice is to describe the feature in something like User Stories
If you found a bug please create an issue.
Mark the issue as bug
.
Try to include as much information as possible in order to recreate the bug. This might include:
- Expected output
- Actual output
- An idea how the bug might have been caused
- A minimal working example that recreates the bug
Again those points are not required but help future contributors to easier track the bug down.
- Make a new class in the
org.togetherjava.command.commands
package. All classes in that package are automatically registered at runtime. - Make sure the class has a constructor that takes no arguments or takes a single
Toml
instance (the bot config). - Implement the mandated method:
public LiteralCommandNode<CommandSource> getCommand(CommandDispatcher<CommandSource> dispatcher) {
- Build your command in there. Here is the echo command, which might serve as an example:
@Override public LiteralCommandNode<CommandSource> getCommand(CommandDispatcher<CommandSource> dispatcher) { return CommandGenericHelper.literal("echo") .then( CommandGenericHelper.argument("message", StringArgumentType.greedyString()) .executes(context -> { CommandSource source = context.getSource(); String argument = context.getArgument("message", String.class); source.getMessageSender() .sendMessage(SimpleMessage.information(argument), source.getChannel()); return 0; }) ) .build(); }
- For more information on adding commands, refer to the documentation for Brigardier or ask :)
If your commit is related to an Issue please link it accordingly within the message (see this page, essentially a #
followed by the issuenumber)
Try to commit only few changes at a time.
Please only submit one Feature per PR. It makes it easier to review and log which improvemant came from where. Do create a branch per feature so that you do not accidentally create a PR for multiple features.
Within the Description of the PR please include the feature you implemented. Best practice would be to link the corresponding issue. This makes it easier for someone reviewing your code to understand your intent and properly check if you implemented it according to the initial requirements.
Improvements to the Markdown files in this repo are also always welcome.