Use JDA LTS #8

Merge aplicado
Awakened-Redstone mesclou 8 commits from experimental/jda-lts into master 2022-03-13 03:26:17 +00:00
3 arquivos alterados com 3 adições e 5 exclusões
Mostrando apenas as alterações do commit ee2cbf3f5e - Mostrar todos os commits

Merge branch 'master' into experimental/jda-lts

Awakened-Redstone 2022-03-13 00:25:41 -03:00 commit de GitHub
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados
ID da chave GPG: 4AEE18F83AFDEB23

Ver arquivo

@ -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;
} }

Ver arquivo

@ -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());

Ver arquivo

@ -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");