Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.dv8tion.jda.api.events.guild.member.GuildMemberJoinEvent;
import net.dv8tion.jda.api.events.guild.member.GuildMemberRemoveEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import org.jetbrains.annotations.NotNull;

import org.togetherjava.tjbot.commands.EventReceiver;

Expand All @@ -25,14 +24,14 @@ public LeftoverBookmarksListener(BookmarksSystem bookmarksSystem) {
}

@Override
public void onGuildMemberRemove(@NotNull GuildMemberRemoveEvent event) {
public void onGuildMemberRemove(GuildMemberRemoveEvent event) {
long userID = event.getUser().getIdLong();

bookmarksSystem.startDeletionPeriodForUser(userID);
}

@Override
public void onGuildMemberJoin(@NotNull GuildMemberJoinEvent event) {
public void onGuildMemberJoin(GuildMemberJoinEvent event) {
long userID = event.getUser().getIdLong();

bookmarksSystem.cancelDeletionPeriodForUser(userID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

import org.togetherjava.tjbot.commands.EventReceiver;

import javax.annotation.Nonnull;

import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -41,7 +39,7 @@ public HelpThreadCreatedListener(HelpSystemHelper helper) {
}

@Override
public void onChannelCreate(@Nonnull ChannelCreateEvent createEvent) {
public void onChannelCreate(ChannelCreateEvent createEvent) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can u double check other EventReceivers in the code base? Im pretty sure I copied this method from somewhere in the code base. So maybe that other user also has @Nonnull.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh yea there was more

if (!createEvent.getChannelType().isThread()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* This package offers all functionality for the help system. For example commands that let users
* ask questions, such as {@link org.togetherjava.tjbot.commands.help.AskCommand}.
* This package offers all functionality for the help system. For example commands that handles the
* actions taken after creating a help thread
* {@link org.togetherjava.tjbot.commands.help.HelpThreadCreatedListener}.
*/
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
Expand Down