mirror of
https://github.com/System-End/Discord-MC-Chat.git
synced 2026-04-19 22:05:11 +00:00
恢复,log改warn
This commit is contained in:
parent
85e94f49fc
commit
769bb5be80
1 changed files with 2 additions and 3 deletions
|
|
@ -13,7 +13,6 @@ import net.dv8tion.jda.api.utils.MemberCachePolicy;
|
|||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
|
@ -69,10 +68,10 @@ public class DiscordManager {
|
|||
commands.add(Commands.slash("shutdown", I18nManager.getDmccTranslation("commands.shutdown.description")));
|
||||
}
|
||||
|
||||
CompletableFuture<List<Command>> updateFuture = jda.updateCommands().addCommands((Collection<? extends CommandData>) null).submit();
|
||||
CompletableFuture<List<Command>> updateFuture = jda.updateCommands().addCommands(commands).submit();
|
||||
CompletableFuture<Void> checkFuture = CompletableFuture.runAsync(() -> {
|
||||
if (!updateFuture.isDone()) {
|
||||
LOGGER.info("Registering Discord DMCC commands, this may take a while (around 1 minute)...");
|
||||
LOGGER.warn("Registering Discord DMCC commands, this may take a while (around 1 minute)...");
|
||||
}
|
||||
}, CompletableFuture.delayedExecutor(5, TimeUnit.SECONDS, executor));
|
||||
updateFuture.join();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue