Skip to content

Commit 4c23dfa

Browse files
committed
fix: remove unnecessary if statement.
1 parent 76c441a commit 4c23dfa

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

apps/docs/pages/docs/command-file-setup.mdx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ Here's an example `content` command which replies with the content of the target
9292
},
9393

9494
run: ({ interaction, client, handler }) => {
95-
if (interaction.isMessageContextMenuCommand()) {
96-
interaction.reply(`The message is: ${interaction.targetMessage}`);
97-
}
95+
interaction.reply(`The message is: ${interaction.targetMessage}`);
9896
},
9997

10098
options: {
@@ -117,9 +115,7 @@ Here's an example `content` command which replies with the content of the target
117115
}
118116

119117
export function run({ interaction, client, handler }) {
120-
if (interaction.isMessageContextMenuCommand()) {
121-
interaction.reply(`The message is: ${interaction.targetMessage}`);
122-
}
118+
interaction.reply(`The message is: ${interaction.targetMessage}`);
123119
}
124120

125121
export const options = {
@@ -142,9 +138,7 @@ Here's an example `content` command which replies with the content of the target
142138
}
143139

144140
export function run({ interaction, client, handler }: ContextMenuCommandProps) {
145-
if (interaction.isMessageContextMenuCommand()) {
146-
interaction.reply(`The message is: ${interaction.targetMessage}`);
147-
}
141+
interaction.reply(`The message is: ${interaction.targetMessage}`);
148142
}
149143

150144
export const options: CommandOptions = {

0 commit comments

Comments
 (0)