mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2025-01-29 22:51:35 +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)) {
|
if (connectionConfig().bot.token.equals(BotConfig.DEFAULT_TOKEN)) {
|
||||||
|
if (initial) {
|
||||||
logger().info("");
|
logger().info("");
|
||||||
logger().info("Welcome to DiscordSRV!");
|
logger().info("Welcome to DiscordSRV!");
|
||||||
logger().info("");
|
logger().info("");
|
||||||
logger().info("To get started with using DiscordSRV please configure a bot token, instructions will be listed below");
|
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("You can review and/or disable external services DiscordSRV uses in the " + ConnectionConfig.FILE_NAME + " before adding a bot token");
|
||||||
logger().info("");
|
logger().info("");
|
||||||
JDAConnectionManager.invalidToken(this, true);
|
}
|
||||||
|
discordConnectionManager.invalidToken(true);
|
||||||
results.add(ReloadResults.DEFAULT_BOT_TOKEN);
|
results.add(ReloadResults.DEFAULT_BOT_TOKEN);
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,7 @@ public class JDAConnectionManager implements DiscordConnectionManager {
|
|||||||
String token = botConfig.token;
|
String token = botConfig.token;
|
||||||
boolean defaultToken = false;
|
boolean defaultToken = false;
|
||||||
if (StringUtils.isBlank(token) || (defaultToken = token.equals(BotConfig.DEFAULT_TOKEN))) {
|
if (StringUtils.isBlank(token) || (defaultToken = token.equals(BotConfig.DEFAULT_TOKEN))) {
|
||||||
invalidToken(discordSRV, defaultToken);
|
invalidToken(defaultToken);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,7 +406,7 @@ public class JDAConnectionManager implements DiscordConnectionManager {
|
|||||||
try {
|
try {
|
||||||
instance = jdaBuilder.build();
|
instance = jdaBuilder.build();
|
||||||
} catch (InvalidTokenException ignored) {
|
} catch (InvalidTokenException ignored) {
|
||||||
invalidToken(discordSRV, false);
|
invalidToken(false);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
discordSRV.logger().error("Could not create JDA instance due to an unknown error", 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);
|
discordSRV.setStatus(DiscordSRVApi.Status.FAILED_TO_CONNECT);
|
||||||
return true;
|
return true;
|
||||||
} else if (closeCode == CloseCode.AUTHENTICATION_FAILED) {
|
} else if (closeCode == CloseCode.AUTHENTICATION_FAILED) {
|
||||||
invalidToken(discordSRV, false);
|
invalidToken(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void invalidToken(DiscordSRV discordSRV, boolean defaultToken) {
|
public void invalidToken(boolean defaultToken) {
|
||||||
List<String> lines = Arrays.asList(
|
List<String> lines = Arrays.asList(
|
||||||
"+------------------------------>",
|
"+------------------------------>",
|
||||||
"| Failed to connect to Discord:",
|
"| Failed to connect to Discord:",
|
||||||
|
Loading…
Reference in New Issue
Block a user