Skip to content

Commit

Permalink
Add annotations on poll events
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Apr 21, 2024
1 parent 06234b8 commit 87848fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -40,6 +42,7 @@
* <li>{@link net.dv8tion.jda.api.requests.GatewayIntent#DIRECT_MESSAGE_POLLS DIRECT_MESSAGE_POLLS} to work in private channels</li>
* </ul>
*/
@RequiredIntents(sometimes = {GatewayIntent.GUILD_MESSAGE_POLLS, GatewayIntent.DIRECT_MESSAGE_POLLS})
public class GenericMessagePollVoteEvent extends GenericMessageEvent
{
protected final long userId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -34,6 +36,7 @@
* <li>{@link net.dv8tion.jda.api.requests.GatewayIntent#DIRECT_MESSAGE_POLLS DIRECT_MESSAGE_POLLS} to work in private channels</li>
* </ul>
*/
@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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -34,6 +36,7 @@
* <li>{@link net.dv8tion.jda.api.requests.GatewayIntent#DIRECT_MESSAGE_POLLS DIRECT_MESSAGE_POLLS} to work in private channels</li>
* </ul>
*/
@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)
Expand Down

0 comments on commit 87848fc

Please sign in to comment.