Use JDA LTS #8
3 arquivos alterados com 3 adições e 5 exclusões
Merge branch 'master' into experimental/jda-lts
commit
ee2cbf3f5e
|
|
@ -12,5 +12,6 @@ public class ConfigData {
|
||||||
public String token;
|
public String token;
|
||||||
public String clientId;
|
public String clientId;
|
||||||
public String discordServerId;
|
public String discordServerId;
|
||||||
|
public boolean enableSlashCommands;
|
||||||
public Map<String, List<String>> whitelist;
|
public Map<String, List<String>> whitelist;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,8 @@ public class Bot implements Runnable {
|
||||||
try {
|
try {
|
||||||
jda.getPresence().setActivity(Activity.of(Activity.ActivityType.valueOf(new TranslatableText("bot.activity.type").getString().toUpperCase().replace("PLAYING", "DEFAULT")), new TranslatableText("bot.activity.message").getString()));
|
jda.getPresence().setActivity(Activity.of(Activity.ActivityType.valueOf(new TranslatableText("bot.activity.type").getString().toUpperCase().replace("PLAYING", "DEFAULT")), new TranslatableText("bot.activity.message").getString()));
|
||||||
} catch (IllegalArgumentException | NullPointerException e) { //TODO: remove the replace once JDA is updated to 5.x.x
|
} catch (IllegalArgumentException | NullPointerException e) { //TODO: remove the replace once JDA is updated to 5.x.x
|
||||||
|
jda.getPresence().setActivity(Activity.of(Activity.ActivityType.valueOf(new TranslatableText("bot.activity.type").getString().toUpperCase()), new TranslatableText("bot.activity.message").getString()));
|
||||||
|
} catch (IllegalArgumentException | NullPointerException e) {
|
||||||
AutoWhitelist.LOGGER.error("Failed to set bot activity, the chosen activity type value is not valid.", e);
|
AutoWhitelist.LOGGER.error("Failed to set bot activity, the chosen activity type value is not valid.", e);
|
||||||
}
|
}
|
||||||
TestCommand.register(AutoWhitelistAPI.dispatcher());
|
TestCommand.register(AutoWhitelistAPI.dispatcher());
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,6 @@ public class CommandManager {
|
||||||
return var18;
|
return var18;
|
||||||
} catch (CommandSyntaxException var14) {
|
} catch (CommandSyntaxException var14) {
|
||||||
if (var14.getInput() != null && var14.getCursor() >= 0) {
|
if (var14.getInput() != null && var14.getCursor() >= 0) {
|
||||||
ParseResults<DiscordCommandSource> parse = dispatcher.parse(stringReader, commandSource);
|
|
||||||
CommandContext<DiscordCommandSource> context = parse.getContext().build(parse.getReader().getString());
|
|
||||||
if (context.getChild() == null && context.getCommand() == null) {
|
|
||||||
|
|
||||||
}
|
|
||||||
int i = Math.min(var14.getInput().length(), var14.getCursor());
|
int i = Math.min(var14.getInput().length(), var14.getCursor());
|
||||||
MutableText mutableText = Util.toText(var14.getRawMessage()).shallowCopy();
|
MutableText mutableText = Util.toText(var14.getRawMessage()).shallowCopy();
|
||||||
mutableText.append("\n");
|
mutableText.append("\n");
|
||||||
|
|
|
||||||
Referência em uma nova issue