forked from Fascinated/Bat
add seperate events for boosting
This commit is contained in:
parent
595c61e789
commit
490080b17a
@ -30,7 +30,8 @@ public enum LogType {
|
||||
MEMBER_BAN(LogCategory.MEMBER, "Member Ban"),
|
||||
MEMBER_UNBAN(LogCategory.MEMBER, "Member Unban"),
|
||||
MEMBER_TIMEOUT(LogCategory.MEMBER, "Member Timeout"),
|
||||
MEMBER_BOOST(LogCategory.MEMBER, "Member Boost"),
|
||||
MEMBER_BOOSTED(LogCategory.MEMBER, "Member Boost Add"),
|
||||
MEMBER_BOOST_EXPIRE(LogCategory.MEMBER, "Member Boost Remove"),
|
||||
|
||||
/**
|
||||
* Channel Events
|
||||
|
@ -25,8 +25,6 @@ import net.dv8tion.jda.api.events.guild.member.update.GuildMemberUpdateTimeOutEv
|
||||
import net.dv8tion.jda.api.events.user.update.UserUpdateAvatarEvent;
|
||||
import net.dv8tion.jda.api.events.user.update.UserUpdateGlobalNameEvent;
|
||||
import net.dv8tion.jda.api.events.user.update.UserUpdateNameEvent;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -238,7 +236,7 @@ public class MemberListener implements EventListener {
|
||||
oldBoostTime = oldBoostTime == null ? OffsetDateTime.now() : oldBoostTime;
|
||||
long boostAmount = ChronoUnit.MONTHS.between(oldBoostTime, newBoostTime);
|
||||
long seconds = newBoostTime.toInstant().getEpochSecond();
|
||||
logFeature.sendLog(guild, LogType.MEMBER_BOOST, EmbedUtils.successEmbed()
|
||||
logFeature.sendLog(guild, LogType.MEMBER_BOOSTED, EmbedUtils.successEmbed()
|
||||
.setDescription(new EmbedDescriptionBuilder("Member Boosted")
|
||||
.appendLine("Member: %s".formatted(user.getDiscordUser().getAsMention()), true)
|
||||
.appendLine("Boost Months: %s".formatted(boostAmount), true)
|
||||
@ -255,7 +253,7 @@ public class MemberListener implements EventListener {
|
||||
|
||||
newBoostTime = newBoostTime == null ? OffsetDateTime.now() : newBoostTime;
|
||||
long boostAmount = ChronoUnit.MONTHS.between(newBoostTime, oldBoostTime);
|
||||
logFeature.sendLog(guild, LogType.MEMBER_BOOST, EmbedUtils.errorEmbed()
|
||||
logFeature.sendLog(guild, LogType.MEMBER_BOOST_EXPIRE, EmbedUtils.errorEmbed()
|
||||
.setDescription(new EmbedDescriptionBuilder("Member Boost Expired")
|
||||
.appendLine("Member: %s".formatted(user.getDiscordUser().getAsMention()), true)
|
||||
.appendLine("Boosts Removed: %s".formatted(boostAmount), true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user