Skip to content

Commit

Permalink
✨ Added event-user and event-member in Member Boost Event
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsTheSky committed Apr 30, 2024
1 parent ae3e74e commit 5a4565f
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import info.itsthesky.disky.api.events.SimpleDiSkyEvent;
import info.itsthesky.disky.core.SkriptUtils;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.events.guild.member.update.GuildMemberUpdateBoostTimeEvent;

import java.time.OffsetDateTime;
Expand All @@ -18,8 +20,6 @@ public class MemberBoostEvent extends DiSkyEvent<GuildMemberUpdateBoostTimeEvent

SkriptUtils.registerBotValue(MemberBoostEvent.BukkitMemberBoostEvent.class);

SkriptUtils.registerAuthorValue(MemberBoostEvent.BukkitMemberBoostEvent.class, e -> e.getJDAEvent().getGuild());

SkriptUtils.registerValue(MemberBoostEvent.BukkitMemberBoostEvent.class, OffsetDateTime.class,
event -> event.getJDAEvent().getOldValue(), -1);

Expand All @@ -32,6 +32,11 @@ public class MemberBoostEvent extends DiSkyEvent<GuildMemberUpdateBoostTimeEvent
SkriptUtils.registerValue(MemberBoostEvent.BukkitMemberBoostEvent.class, Guild.class,
event -> event.getJDAEvent().getGuild());

SkriptUtils.registerValue(MemberBoostEvent.BukkitMemberBoostEvent.class, Member.class,
event -> event.getJDAEvent().getMember());

SkriptUtils.registerValue(MemberBoostEvent.BukkitMemberBoostEvent.class, User.class,
event -> event.getJDAEvent().getUser());
}

public static class BukkitMemberBoostEvent extends SimpleDiSkyEvent<GuildMemberUpdateBoostTimeEvent> {
Expand Down

0 comments on commit 5a4565f

Please sign in to comment.