From 9115cacb59a13482e9db763d407f4f56523833f0 Mon Sep 17 00:00:00 2001 From: wallace4BR Date: Sun, 27 Mar 2022 10:52:47 -0300 Subject: [PATCH] :rocket: Some guild events --- .../events/guild/GuildAFKChannelEvent.java | 40 +++++++++++++++++++ .../events/guild/GuildAFKTimeoutEvent.java | 40 +++++++++++++++++++ .../events/guild/GuildBannerEvent.java | 40 +++++++++++++++++++ .../elements/events/guild/GuildIconEvent.java | 40 +++++++++++++++++++ .../events/guild/GuildInviteCreateEvent.java | 36 +++++++++++++++++ .../events/guild/GuildInviteDeleteEvent.java | 33 +++++++++++++++ .../elements/events/guild/GuildJoinEvent.java | 28 +++++++++++++ .../elements/events/guild/GuildNameEvent.java | 40 +++++++++++++++++++ .../events/guild/GuildOwnerEvent.java | 40 +++++++++++++++++++ .../events/guild/GuildSplashEvent.java | 40 +++++++++++++++++++ .../events/guild/GuildUnbanEvent.java | 33 +++++++++++++++ 11 files changed, 410 insertions(+) create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildAFKChannelEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildAFKTimeoutEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildBannerEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildIconEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildInviteCreateEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildInviteDeleteEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildJoinEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildNameEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildOwnerEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildSplashEvent.java create mode 100644 src/main/java/info/itsthesky/disky/elements/events/guild/GuildUnbanEvent.java diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildAFKChannelEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildAFKChannelEvent.java new file mode 100644 index 00000000..bd046596 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildAFKChannelEvent.java @@ -0,0 +1,40 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.events.guild.update.GuildUpdateAfkChannelEvent; + +public class GuildAFKChannelEvent extends DiSkyEvent { + + static { + register("Guild AFK Channel Event", GuildAFKChannelEvent.class, BukkitGuildAFKChannelEvent.class, + "[discord] guild afk channel (change|update))") + .description("Fired when a afk channel of a guild changes \n can be used to get the old/new channel, the author and the guild.") + .examples("on guild afk channel change:"); + + + SkriptUtils.registerBotValue(GuildAFKChannelEvent.BukkitGuildAFKChannelEvent.class); + + SkriptUtils.registerAuthorValue(GuildAFKChannelEvent.BukkitGuildAFKChannelEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildAFKChannelEvent.BukkitGuildAFKChannelEvent.class, VoiceChannel.class, + event -> event.getJDAEvent().getOldValue(), -1); + + SkriptUtils.registerValue(GuildAFKChannelEvent.BukkitGuildAFKChannelEvent.class, VoiceChannel.class, + event -> event.getJDAEvent().getNewValue(), 0); + + SkriptUtils.registerValue(GuildAFKChannelEvent.BukkitGuildAFKChannelEvent.class, VoiceChannel.class, + event -> event.getJDAEvent().getNewValue(), 1); + + SkriptUtils.registerValue(GuildAFKChannelEvent.BukkitGuildAFKChannelEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitGuildAFKChannelEvent extends SimpleDiSkyEvent { + public BukkitGuildAFKChannelEvent(GuildAFKChannelEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildAFKTimeoutEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildAFKTimeoutEvent.java new file mode 100644 index 00000000..235ee1e4 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildAFKTimeoutEvent.java @@ -0,0 +1,40 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.events.guild.update.GuildUpdateAfkTimeoutEvent; + +public class GuildAFKTimeoutEvent extends DiSkyEvent { + + static { + register("Guild AFK Timeout Event", GuildAFKTimeoutEvent.class, BukkitAFKTimeoutEvent.class, + "[discord] guild afk timeout (change|update)") + .description("Fired when a afk timeout of a guild changes \n can be used to get the old/new timeout value, the author and the guild.") + .examples("on guild afk timeout change:"); + + + SkriptUtils.registerBotValue(GuildAFKTimeoutEvent.BukkitAFKTimeoutEvent.class); + + SkriptUtils.registerAuthorValue(GuildAFKTimeoutEvent.BukkitAFKTimeoutEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildAFKTimeoutEvent.BukkitAFKTimeoutEvent.class, Guild.Timeout.class, + event -> event.getJDAEvent().getOldValue(), -1); + + SkriptUtils.registerValue(GuildAFKTimeoutEvent.BukkitAFKTimeoutEvent.class, Guild.Timeout.class, + event -> event.getJDAEvent().getNewValue(), 0); + + SkriptUtils.registerValue(GuildAFKTimeoutEvent.BukkitAFKTimeoutEvent.class, Guild.Timeout.class, + event -> event.getJDAEvent().getNewValue(), 1); + + SkriptUtils.registerValue(GuildAFKTimeoutEvent.BukkitAFKTimeoutEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitAFKTimeoutEvent extends SimpleDiSkyEvent { + public BukkitAFKTimeoutEvent(GuildAFKTimeoutEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildBannerEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildBannerEvent.java new file mode 100644 index 00000000..55df220a --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildBannerEvent.java @@ -0,0 +1,40 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.events.guild.update.GuildUpdateBannerEvent; + +public class GuildBannerEvent extends DiSkyEvent { + + static { + register("Guild Banner Event", GuildBannerEvent.class, BukkitGuildBannerEvent.class, + "[discord] guild banner (change|update)") + .description("Fired when a banner of a guild changes \n can be used to get the old/new banner, the author and the guild.") + .examples("on guild banner change:"); + + + SkriptUtils.registerBotValue(GuildBannerEvent.BukkitGuildBannerEvent.class); + + SkriptUtils.registerAuthorValue(GuildBannerEvent.BukkitGuildBannerEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildBannerEvent.BukkitGuildBannerEvent.class, String.class, + event -> event.getJDAEvent().getOldBannerUrl(), -1); + + SkriptUtils.registerValue(GuildBannerEvent.BukkitGuildBannerEvent.class, String.class, + event -> event.getJDAEvent().getNewBannerUrl(), 0); + + SkriptUtils.registerValue(GuildBannerEvent.BukkitGuildBannerEvent.class, String.class, + event -> event.getJDAEvent().getNewBannerUrl(), 1); + + SkriptUtils.registerValue(GuildBannerEvent.BukkitGuildBannerEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitGuildBannerEvent extends SimpleDiSkyEvent { + public BukkitGuildBannerEvent(GuildBannerEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildIconEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildIconEvent.java new file mode 100644 index 00000000..e73b8c46 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildIconEvent.java @@ -0,0 +1,40 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.events.guild.update.GuildUpdateIconEvent; + +public class GuildIconEvent extends DiSkyEvent { + + static { + register("Guild Icon Event", GuildIconEvent.class, BukkitGuildIconEvent.class, + "[discord] guild icon (change|update)") + .description("Fired when the icon of a guild changes \n can be used to get the old/new icon, the author and the guild.") + .examples("on guild icon change:"); + + + SkriptUtils.registerBotValue(GuildIconEvent.BukkitGuildIconEvent.class); + + SkriptUtils.registerAuthorValue(GuildIconEvent.BukkitGuildIconEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildIconEvent.BukkitGuildIconEvent.class, String.class, + event -> event.getJDAEvent().getOldIconUrl(), -1); + + SkriptUtils.registerValue(GuildIconEvent.BukkitGuildIconEvent.class, String.class, + event -> event.getJDAEvent().getNewIconUrl(), 0); + + SkriptUtils.registerValue(GuildIconEvent.BukkitGuildIconEvent.class, String.class, + event -> event.getJDAEvent().getNewIconUrl(), 1); + + SkriptUtils.registerValue(GuildIconEvent.BukkitGuildIconEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitGuildIconEvent extends SimpleDiSkyEvent { + public BukkitGuildIconEvent(GuildIconEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildInviteCreateEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildInviteCreateEvent.java new file mode 100644 index 00000000..dc7dedb8 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildInviteCreateEvent.java @@ -0,0 +1,36 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; + +public class GuildInviteCreateEvent extends DiSkyEvent { + + static { + register("Invite Create Event", GuildInviteCreateEvent.class, BukkitInviteCreateEvent.class, + "[discord] guild invite create)") + .description("Fired when a invite is created in a guild \n can be used to get the invite property, the author and the guild.") + .examples("guild invite create:"); + + + SkriptUtils.registerBotValue(GuildInviteCreateEvent.BukkitInviteCreateEvent.class); + + SkriptUtils.registerAuthorValue(GuildInviteCreateEvent.BukkitInviteCreateEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildInviteDeleteEvent.BukkitInviteDeleteEvent.class, Channel.class, + event -> event.getJDAEvent().getChannel(), 0); + + SkriptUtils.registerValue(GuildInviteCreateEvent.BukkitInviteCreateEvent.class, Invite.class, + event -> event.getJDAEvent().getInvite(), 0); + + SkriptUtils.registerValue(GuildInviteCreateEvent.BukkitInviteCreateEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitInviteCreateEvent extends SimpleDiSkyEvent { + public BukkitInviteCreateEvent(GuildInviteCreateEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildInviteDeleteEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildInviteDeleteEvent.java new file mode 100644 index 00000000..c2d119d4 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildInviteDeleteEvent.java @@ -0,0 +1,33 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; + +public class GuildInviteDeleteEvent extends DiSkyEvent { + + static { + register("Invite Delete Event", GuildInviteDeleteEvent.class, BukkitInviteDeleteEvent.class, + "[discord] guild invite delete") + .description("Fired when a invite is deleted from a guild \n can be used to get the invite property, the author and the guild.") + .examples("guild invite create:"); + + + SkriptUtils.registerBotValue(GuildInviteDeleteEvent.BukkitInviteDeleteEvent.class); + + SkriptUtils.registerAuthorValue(GuildInviteDeleteEvent.BukkitInviteDeleteEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildInviteDeleteEvent.BukkitInviteDeleteEvent.class, Channel.class, + event -> event.getJDAEvent().getChannel(), 0); + + SkriptUtils.registerValue(GuildInviteDeleteEvent.BukkitInviteDeleteEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitInviteDeleteEvent extends SimpleDiSkyEvent { + public BukkitInviteDeleteEvent(GuildInviteDeleteEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildJoinEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildJoinEvent.java new file mode 100644 index 00000000..a3a274f9 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildJoinEvent.java @@ -0,0 +1,28 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; + +public class GuildJoinEvent extends DiSkyEvent { + + static { + register("Guild Join Event", GuildJoinEvent.class, BukkitGuildJoinEvent.class, + "[discord] bot join guild)") + .description("Fired when the bot joins in a guild.") + .examples("on bot join guild:"); + + + SkriptUtils.registerBotValue(GuildJoinEvent.BukkitGuildJoinEvent.class); + + SkriptUtils.registerValue(GuildJoinEvent.BukkitGuildJoinEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitGuildJoinEvent extends SimpleDiSkyEvent { + public BukkitGuildJoinEvent(GuildJoinEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildNameEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildNameEvent.java new file mode 100644 index 00000000..8d5150f8 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildNameEvent.java @@ -0,0 +1,40 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.events.guild.update.GuildUpdateNameEvent; + +public class GuildNameEvent extends DiSkyEvent { + + static { + register("Guild Name Event", GuildNameEvent.class, BukkitGuildNameEvent.class, + "[discord] guild name (update|change))") + .description("Fired when the name of a guild is changed \n can be used to get the old/new name.") + .examples("on guild name:"); + + + SkriptUtils.registerBotValue(GuildNameEvent.BukkitGuildNameEvent.class); + + SkriptUtils.registerAuthorValue(GuildNameEvent.BukkitGuildNameEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildNameEvent.BukkitGuildNameEvent.class, String.class, + event -> event.getJDAEvent().getOldValue(), -1); + + SkriptUtils.registerValue(GuildNameEvent.BukkitGuildNameEvent.class, String.class, + event -> event.getJDAEvent().getNewValue(), 0); + + SkriptUtils.registerValue(GuildNameEvent.BukkitGuildNameEvent.class, String.class, + event -> event.getJDAEvent().getNewValue(), 1); + + SkriptUtils.registerValue(GuildNameEvent.BukkitGuildNameEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitGuildNameEvent extends SimpleDiSkyEvent { + public BukkitGuildNameEvent(GuildNameEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildOwnerEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildOwnerEvent.java new file mode 100644 index 00000000..1a58ffc1 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildOwnerEvent.java @@ -0,0 +1,40 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.events.guild.update.GuildUpdateOwnerEvent; + +public class GuildOwnerEvent extends DiSkyEvent { + + static { + register("Guild Owner Event", GuildOwnerEvent.class, BukkitGuildOwnerEvent.class, + "[discord] guild owner (change|update)") + .description("Fired when a owner of a guild changes \n can be used to get the old/new owner, the author and the guild.") + .examples("on guild owner change:"); + + + SkriptUtils.registerBotValue(GuildOwnerEvent.BukkitGuildOwnerEvent.class); + + SkriptUtils.registerAuthorValue(GuildOwnerEvent.BukkitGuildOwnerEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildOwnerEvent.BukkitGuildOwnerEvent.class, Member.class, + event -> event.getJDAEvent().getOldOwner(), -1); + + SkriptUtils.registerValue(GuildOwnerEvent.BukkitGuildOwnerEvent.class, Member.class, + event -> event.getJDAEvent().getNewOwner(), 0); + + SkriptUtils.registerValue(GuildOwnerEvent.BukkitGuildOwnerEvent.class, Member.class, + event -> event.getJDAEvent().getNewOwner(), 1); + + SkriptUtils.registerValue(GuildOwnerEvent.BukkitGuildOwnerEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild()); + + } + + public static class BukkitGuildOwnerEvent extends SimpleDiSkyEvent { + public BukkitGuildOwnerEvent(GuildOwnerEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildSplashEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildSplashEvent.java new file mode 100644 index 00000000..4e5de123 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildSplashEvent.java @@ -0,0 +1,40 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.events.guild.update.GuildUpdateSplashEvent; + +public class GuildSplashEvent extends DiSkyEvent { + + static { + register("Guild Splash Event", GuildSplashEvent.class, BukkitGuildSplashEvent.class, + "[discord] guild splash (change|update)") + .description("Fired when a banner of a guild changes \n can be used to get the old/new banner, the author and the guild.") + .examples("on guild splash change:"); + + + SkriptUtils.registerBotValue(GuildSplashEvent.BukkitGuildSplashEvent.class); + + SkriptUtils.registerAuthorValue(GuildSplashEvent.BukkitGuildSplashEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildSplashEvent.BukkitGuildSplashEvent.class, String.class, + event -> event.getJDAEvent().getOldSplashUrl(), -1); + + SkriptUtils.registerValue(GuildSplashEvent.BukkitGuildSplashEvent.class, String.class, + event -> event.getJDAEvent().getNewSplashUrl(), 0); + + SkriptUtils.registerValue(GuildSplashEvent.BukkitGuildSplashEvent.class, String.class, + event -> event.getJDAEvent().getNewSplashUrl(), 1); + + SkriptUtils.registerValue(GuildSplashEvent.BukkitGuildSplashEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitGuildSplashEvent extends SimpleDiSkyEvent { + public BukkitGuildSplashEvent(GuildSplashEvent event) { + } + } +} \ No newline at end of file diff --git a/src/main/java/info/itsthesky/disky/elements/events/guild/GuildUnbanEvent.java b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildUnbanEvent.java new file mode 100644 index 00000000..2ebb84f2 --- /dev/null +++ b/src/main/java/info/itsthesky/disky/elements/events/guild/GuildUnbanEvent.java @@ -0,0 +1,33 @@ +package info.itsthesky.disky.elements.events.guild; + +import info.itsthesky.disky.api.events.DiSkyEvent; +import info.itsthesky.disky.api.events.SimpleDiSkyEvent; +import info.itsthesky.disky.core.SkriptUtils; +import net.dv8tion.jda.api.entities.*; + +public class GuildUnbanEvent extends DiSkyEvent { + + static { + register("Guild Unban Event", GuildUnbanEvent.class, BukkitUserUnbanEvent.class, + "[discord] guild [user] unban)") + .description("Fired when a user is unbanned \n can be used to get the unbanned user, the author and the guild.") + .examples("on guild unban:"); + + + SkriptUtils.registerBotValue(GuildUnbanEvent.BukkitUserUnbanEvent.class); + + SkriptUtils.registerAuthorValue(GuildUnbanEvent.BukkitUserUnbanEvent.class, e -> e.getJDAEvent().getGuild()); + + SkriptUtils.registerValue(GuildUnbanEvent.BukkitUserUnbanEvent.class, User.class, + event -> event.getJDAEvent().getUser(), 0); + + SkriptUtils.registerValue(GuildUnbanEvent.BukkitUserUnbanEvent.class, Guild.class, + event -> event.getJDAEvent().getGuild(), 0); + + } + + public static class BukkitUserUnbanEvent extends SimpleDiSkyEvent { + public BukkitUserUnbanEvent(GuildUnbanEvent event) { + } + } +} \ No newline at end of file