Skip to content

Commit

Permalink
use string types for now
Browse files Browse the repository at this point in the history
  • Loading branch information
catplvsplus committed Oct 24, 2024
1 parent 323edc3 commit d0e2b19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { setContextMenuCommand, setMessageCommand, setRecipleModule, setRecipleModuleLoad, setRecipleModuleStart, setRecipleModuleUnload, setSlashCommand } from '@reciple/decorators';
import { ApplicationCommandType } from 'discord-api-types/v10';
import { AnyCommandExecuteData, CommandType, RecipleModuleData } from "reciple";

@setRecipleModule()
Expand Down Expand Up @@ -27,7 +26,7 @@ export class PingCommand implements RecipleModuleData {
/**
* Sets the commands
*/
@setContextMenuCommand({ name: 'ping', type: ApplicationCommandType.Message })
@setContextMenuCommand({ name: 'ping', type: 'Message' })
@setMessageCommand({ name: 'ping', description: 'Replies with pong!' })
@setSlashCommand({ name: 'ping', description: 'Replies with pong!' })
async handleCommandExecute(data: AnyCommandExecuteData): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { ApplicationCommandType } from 'discord-api-types/v10';
import { AnyCommandExecuteData, CommandType, ContextMenuCommandBuilder, MessageCommandBuilder, RecipleModuleData, SlashCommandBuilder, type AnyCommandResolvable } from "reciple";

export class PingCommand implements RecipleModuleData {
public commands: AnyCommandResolvable[] = [
new ContextMenuCommandBuilder()
.setName('ping')
.setType(ApplicationCommandType.Message)
.setType('Message')
.setExecute(data => this.handleCommandExecute(data)),
new MessageCommandBuilder()
.setName('ping')
Expand Down

0 comments on commit d0e2b19

Please sign in to comment.