From 68bedc104bd26d17fedaade083e5fa4906ef001a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Mar 2022 12:42:48 -0700 Subject: [PATCH] QOL Fixes --- src/main/java/moe/oko/Kiafumi/Kiafumi.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/moe/oko/Kiafumi/Kiafumi.java b/src/main/java/moe/oko/Kiafumi/Kiafumi.java index a6caea6..1a6e8ee 100644 --- a/src/main/java/moe/oko/Kiafumi/Kiafumi.java +++ b/src/main/java/moe/oko/Kiafumi/Kiafumi.java @@ -19,6 +19,7 @@ import net.dv8tion.jda.api.requests.GatewayIntent; import net.dv8tion.jda.api.requests.restaction.CommandCreateAction; import net.dv8tion.jda.api.utils.ChunkingFilter; import net.dv8tion.jda.api.utils.MemberCachePolicy; +import net.dv8tion.jda.api.utils.cache.CacheFlag; import org.simpleyaml.configuration.file.YamlConfiguration; import org.simpleyaml.exceptions.InvalidConfigurationException; import org.slf4j.Logger; @@ -30,6 +31,7 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; +import java.time.ZonedDateTime; import java.time.temporal.TemporalAccessor; import java.util.ArrayList; import java.util.List; @@ -162,6 +164,7 @@ public class Kiafumi { GatewayIntent.DIRECT_MESSAGES, GatewayIntent.GUILD_PRESENCES) .setChunkingFilter(ChunkingFilter.ALL) .setMemberCachePolicy(MemberCachePolicy.ALL) + .disableCache(CacheFlag.VOICE_STATE, CacheFlag.EMOTE) .setActivity(Activity.of(Activity.ActivityType.valueOf(config.getActivityType()), config.getActivityMsg())) .setStatus(OnlineStatus.valueOf(config.getStatusType())) .addEventListeners(new MainListener()).build().awaitReady(); @@ -174,8 +177,12 @@ public class Kiafumi { registerAllCommands(); info("Loaded " + activeCommands.size() + " commands."); - EmbedBuilder eb = new EmbedBuilder().setTitle("Kiafumi Online") - .setFooter("Created by Oko, Laika, and Tiddy").setColor(new Color(0x6271c1)); + EmbedBuilder eb = new EmbedBuilder() + .setTitle("Kiafumi Online") + .setFooter("Created by Oko, Laika, and Tiddy") + .setColor(new Color(0x6271c1)) + .setTimestamp(ZonedDateTime.now()) + .setAuthor("Kiafumi!", null, Kiafumi.JDA.getSelfUser().getAvatarUrl()); JDA.getTextChannelById(config.getLogChannel()).sendMessageEmbeds(eb.build()).queue(); }