Skip to content

Commit 0933b5f

Browse files
committed
Log warns instead of errors for interaction filters that did not acknowledge the interaction
1 parent c6c907c commit 0933b5f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

BotCommands-core/src/main/kotlin/io/github/freya022/botcommands/internal/commands/application/ApplicationCommandListener.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ internal class ApplicationCommandListener internal constructor(
263263
if (event.isAcknowledged) {
264264
logger.trace { "${filter.description} rejected application command '${event.commandString}' by user ${event.user.id}: $rejectionReason" }
265265
} else {
266-
logger.error { "${filter.description} rejected application command '${event.commandString}' by user ${event.user.id} but did not acknowledge the interaction: $rejectionReason" }
266+
logger.warn { "${filter.description} rejected application command '${event.commandString}' by user ${event.user.id} but did not acknowledge the interaction: $rejectionReason" }
267267
}
268268
return false
269269
}
@@ -283,4 +283,4 @@ internal class ApplicationCommandListener internal constructor(
283283
private inline fun fromMessages(event: Interaction, crossinline block: BotCommandsMessages.() -> MessageCreateData): MessageCreateData {
284284
return messagesFactory.get(event).run(block)
285285
}
286-
}
286+
}

BotCommands-core/src/main/kotlin/io/github/freya022/botcommands/internal/components/controller/ComponentsListener.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ internal class ComponentsListener(
111111
if (event.isAcknowledged) {
112112
logger.trace { "${filter::class.simpleNestedName} rejected ${event.componentType} interaction by user ${event.user.id} (handler: ${component.handler}): $rejectionReason" }
113113
} else {
114-
logger.error { "${filter::class.simpleNestedName} rejected ${event.componentType} interaction by user ${event.user.id} (handler: ${component.handler}) but did not acknowledge the interaction: $rejectionReason" }
114+
logger.warn { "${filter::class.simpleNestedName} rejected ${event.componentType} interaction by user ${event.user.id} (handler: ${component.handler}) but did not acknowledge the interaction: $rejectionReason" }
115115
}
116116
return false
117117
}

0 commit comments

Comments
 (0)