mirror of
https://github.com/Noratrieb/killua-bot.git
synced 2026-01-16 08:05:01 +01:00
inital commit
This commit is contained in:
parent
0e42755c88
commit
bff80d48ad
3 changed files with 8 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
target\*
|
target\*
|
||||||
.idea/*
|
.idea/*
|
||||||
*.class
|
*.class
|
||||||
|
Secrets.java
|
||||||
|
|
@ -5,6 +5,7 @@ import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
||||||
public abstract class Command {
|
public abstract class Command {
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
private final CommandParser parser = CommandParser.getInstance();
|
||||||
|
|
||||||
public Command(String name) {
|
public Command(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,12 @@ import com.github.nilstrieb.cofig.Config;
|
||||||
|
|
||||||
public class CommandParser {
|
public class CommandParser {
|
||||||
|
|
||||||
|
private static final CommandParser parser = new CommandParser();
|
||||||
|
|
||||||
|
public static CommandParser getInstance() {
|
||||||
|
return parser;
|
||||||
|
}
|
||||||
|
|
||||||
public String[] splitOffCommandName(String contentRaw) {
|
public String[] splitOffCommandName(String contentRaw) {
|
||||||
String[] returns = new String[2];
|
String[] returns = new String[2];
|
||||||
String beheaded = contentRaw.substring(Config.PREFIX.length());
|
String beheaded = contentRaw.substring(Config.PREFIX.length());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue