Skip to content

Commit

Permalink
Update PingCommand to work in private channels and DMs
Browse files Browse the repository at this point in the history
  • Loading branch information
WinG4merBR committed Jan 15, 2025
1 parent b756e32 commit 925e87c
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@ package net.cakeyfox.foxy.command.vanilla.utils.declarations
import net.cakeyfox.foxy.command.structure.FoxyCommandDeclarationBuilder
import net.cakeyfox.foxy.command.structure.FoxyCommandDeclarationWrapper
import net.cakeyfox.foxy.command.vanilla.utils.PingExecutor
import net.dv8tion.jda.api.interactions.IntegrationType
import net.dv8tion.jda.api.interactions.InteractionContextType

class PingCommand : FoxyCommandDeclarationWrapper {
override fun create(): FoxyCommandDeclarationBuilder = command(
"ping",
"ping.description",

interactionContexts = listOf(
InteractionContextType.BOT_DM,
InteractionContextType.GUILD,
InteractionContextType.PRIVATE_CHANNEL
),
integrationType = listOf(
IntegrationType.USER_INSTALL,
IntegrationType.GUILD_INSTALL
),
block = {
executor = PingExecutor()
}
Expand Down

0 comments on commit 925e87c

Please sign in to comment.