From 87848fc35d298b407fe8a79fba8a6c41bda6d8ee Mon Sep 17 00:00:00 2001
From: freya02 <41875020+freya022@users.noreply.github.com>
Date: Sun, 21 Apr 2024 12:22:56 +0200
Subject: [PATCH] Add annotations on poll events
---
.../api/events/message/poll/GenericMessagePollVoteEvent.java | 3 +++
.../jda/api/events/message/poll/MessagePollVoteAddEvent.java | 3 +++
.../api/events/message/poll/MessagePollVoteRemoveEvent.java | 3 +++
3 files changed, 9 insertions(+)
diff --git a/src/main/java/net/dv8tion/jda/api/events/message/poll/GenericMessagePollVoteEvent.java b/src/main/java/net/dv8tion/jda/api/events/message/poll/GenericMessagePollVoteEvent.java
index f8ada658eb1..437513de890 100644
--- a/src/main/java/net/dv8tion/jda/api/events/message/poll/GenericMessagePollVoteEvent.java
+++ b/src/main/java/net/dv8tion/jda/api/events/message/poll/GenericMessagePollVoteEvent.java
@@ -20,7 +20,9 @@
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
+import net.dv8tion.jda.api.events.annotations.RequiredIntents;
import net.dv8tion.jda.api.events.message.GenericMessageEvent;
+import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.requests.RestAction;
import javax.annotation.CheckReturnValue;
@@ -40,6 +42,7 @@
*
{@link net.dv8tion.jda.api.requests.GatewayIntent#DIRECT_MESSAGE_POLLS DIRECT_MESSAGE_POLLS} to work in private channels
*
*/
+@RequiredIntents(sometimes = {GatewayIntent.GUILD_MESSAGE_POLLS, GatewayIntent.DIRECT_MESSAGE_POLLS})
public class GenericMessagePollVoteEvent extends GenericMessageEvent
{
protected final long userId;
diff --git a/src/main/java/net/dv8tion/jda/api/events/message/poll/MessagePollVoteAddEvent.java b/src/main/java/net/dv8tion/jda/api/events/message/poll/MessagePollVoteAddEvent.java
index 24fa90eefb8..7a57dada799 100644
--- a/src/main/java/net/dv8tion/jda/api/events/message/poll/MessagePollVoteAddEvent.java
+++ b/src/main/java/net/dv8tion/jda/api/events/message/poll/MessagePollVoteAddEvent.java
@@ -17,6 +17,8 @@
package net.dv8tion.jda.api.events.message.poll;
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
+import net.dv8tion.jda.api.events.annotations.RequiredIntents;
+import net.dv8tion.jda.api.requests.GatewayIntent;
import javax.annotation.Nonnull;
@@ -34,6 +36,7 @@
* {@link net.dv8tion.jda.api.requests.GatewayIntent#DIRECT_MESSAGE_POLLS DIRECT_MESSAGE_POLLS} to work in private channels
*
*/
+@RequiredIntents(sometimes = {GatewayIntent.GUILD_MESSAGE_POLLS, GatewayIntent.DIRECT_MESSAGE_POLLS})
public class MessagePollVoteAddEvent extends GenericMessagePollVoteEvent
{
public MessagePollVoteAddEvent(@Nonnull MessageChannel channel, long responseNumber, long messageId, long userId, long answerId)
diff --git a/src/main/java/net/dv8tion/jda/api/events/message/poll/MessagePollVoteRemoveEvent.java b/src/main/java/net/dv8tion/jda/api/events/message/poll/MessagePollVoteRemoveEvent.java
index 5c261f88fec..c4a13826829 100644
--- a/src/main/java/net/dv8tion/jda/api/events/message/poll/MessagePollVoteRemoveEvent.java
+++ b/src/main/java/net/dv8tion/jda/api/events/message/poll/MessagePollVoteRemoveEvent.java
@@ -17,6 +17,8 @@
package net.dv8tion.jda.api.events.message.poll;
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
+import net.dv8tion.jda.api.events.annotations.RequiredIntents;
+import net.dv8tion.jda.api.requests.GatewayIntent;
import javax.annotation.Nonnull;
@@ -34,6 +36,7 @@
* {@link net.dv8tion.jda.api.requests.GatewayIntent#DIRECT_MESSAGE_POLLS DIRECT_MESSAGE_POLLS} to work in private channels
*
*/
+@RequiredIntents(sometimes = {GatewayIntent.GUILD_MESSAGE_POLLS, GatewayIntent.DIRECT_MESSAGE_POLLS})
public class MessagePollVoteRemoveEvent extends GenericMessagePollVoteEvent
{
public MessagePollVoteRemoveEvent(@Nonnull MessageChannel channel, long responseNumber, long messageId, long userId, long answerId)