mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-10-31 08:32:18 +01:00
Tweak the welcome message some more
This commit is contained in:
parent
9daa138a12
commit
3c7d4074dc
@ -675,13 +675,15 @@ public abstract class AbstractDiscordSRV<
|
||||
}
|
||||
|
||||
if (connectionConfig().bot.token.equals(BotConfig.DEFAULT_TOKEN)) {
|
||||
logger().info("");
|
||||
logger().info("Welcome to DiscordSRV!");
|
||||
logger().info("");
|
||||
logger().info("To get started with using DiscordSRV please configure a bot token, instructions will be listed below");
|
||||
logger().info("You can review and/or disable external services DiscordSRV uses in the " + ConnectionConfig.FILE_NAME + " before adding a bot token");
|
||||
logger().info("");
|
||||
JDAConnectionManager.invalidToken(this, true);
|
||||
if (initial) {
|
||||
logger().info("");
|
||||
logger().info("Welcome to DiscordSRV!");
|
||||
logger().info("");
|
||||
logger().info("To get started with using DiscordSRV please configure a bot token, instructions will be printed below");
|
||||
logger().info("You can review and/or disable external services DiscordSRV uses in the " + ConnectionConfig.FILE_NAME + " before adding a bot token");
|
||||
logger().info("");
|
||||
}
|
||||
discordConnectionManager.invalidToken(true);
|
||||
results.add(ReloadResults.DEFAULT_BOT_TOKEN);
|
||||
return results;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ public class JDAConnectionManager implements DiscordConnectionManager {
|
||||
String token = botConfig.token;
|
||||
boolean defaultToken = false;
|
||||
if (StringUtils.isBlank(token) || (defaultToken = token.equals(BotConfig.DEFAULT_TOKEN))) {
|
||||
invalidToken(discordSRV, defaultToken);
|
||||
invalidToken(defaultToken);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ public class JDAConnectionManager implements DiscordConnectionManager {
|
||||
try {
|
||||
instance = jdaBuilder.build();
|
||||
} catch (InvalidTokenException ignored) {
|
||||
invalidToken(discordSRV, false);
|
||||
invalidToken(false);
|
||||
} catch (Throwable t) {
|
||||
discordSRV.logger().error("Could not create JDA instance due to an unknown error", t);
|
||||
}
|
||||
@ -565,13 +565,13 @@ public class JDAConnectionManager implements DiscordConnectionManager {
|
||||
discordSRV.setStatus(DiscordSRVApi.Status.FAILED_TO_CONNECT);
|
||||
return true;
|
||||
} else if (closeCode == CloseCode.AUTHENTICATION_FAILED) {
|
||||
invalidToken(discordSRV, false);
|
||||
invalidToken(false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void invalidToken(DiscordSRV discordSRV, boolean defaultToken) {
|
||||
public void invalidToken(boolean defaultToken) {
|
||||
List<String> lines = Arrays.asList(
|
||||
"+------------------------------>",
|
||||
"| Failed to connect to Discord:",
|
||||
|
Loading…
Reference in New Issue
Block a user