Skip to content

Commit

Permalink
Lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Jun 24, 2024
1 parent 3e7b9b5 commit 8f1db6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public ModBaseCommand() {
this.userPermissions = new Permission[]{Permission.KICK_MEMBERS, Permission.BAN_MEMBERS};
}

@SuppressWarnings("PMD.EmptyMethodInAbstractClassShouldBeAbstract")
@Override
protected void configureSlashSupport(@NotNull SlashCommandData baseData) {
// NO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ package me.duncte123.skybot.commands.mod

import com.dunctebot.models.settings.WarnAction
import com.dunctebot.models.utils.DateUtils
import me.duncte123.botcommons.messaging.MessageUtils
import me.duncte123.botcommons.messaging.MessageUtils.sendErrorWithMessage
import me.duncte123.botcommons.messaging.MessageUtils.sendMsg
import me.duncte123.skybot.Variables
import me.duncte123.skybot.commands.guild.mod.ModBaseCommand
Expand Down Expand Up @@ -93,7 +91,6 @@ class WarnCommand : ModBaseCommand() {
return
}


val moderator = event.member!!
val channel = event.channel

Expand All @@ -109,7 +106,7 @@ class WarnCommand : ModBaseCommand() {
|Reason: ${if (reason.isEmpty()) "No reason given" else "`$reason`"}
""".trimMargin()

event.deferReply().queue();
event.deferReply().queue()

// add the new warning to the database
val future = variables.database.createWarning(
Expand Down Expand Up @@ -164,7 +161,14 @@ class WarnCommand : ModBaseCommand() {
.find { threshold >= it.threshold }
}

private fun invokeAction(warnings: Int, action: WarnAction, modUser: User, target: Member, guild: DunctebotGuild, variables: Variables) {
private fun invokeAction(
warnings: Int,
action: WarnAction,
modUser: User,
target: Member,
guild: DunctebotGuild,
variables: Variables,
) {
val targetUser = target.user

if ((action.type == WarnAction.Type.MUTE || action.type == WarnAction.Type.TEMP_MUTE) &&
Expand Down

0 comments on commit 8f1db6e

Please sign in to comment.