Skip to content

Commit da7bc17

Browse files
authored
feat(emoji): add contexts for the message context command (#275)
1 parent 6fe202a commit da7bc17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/commands/emoji.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ export class UserCommand extends Command {
3838
: this.getDiscordResponse(interaction, data);
3939
}
4040

41-
@RegisterMessageCommand((builder) => applyNameLocalizedBuilder(builder, Root.ExtractEmojisName))
41+
@RegisterMessageCommand((builder) =>
42+
applyNameLocalizedBuilder(builder, Root.ExtractEmojisName)
43+
.setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall)
44+
.setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel)
45+
)
4246
public onMessageContext(interaction: Command.MessageInteraction, options: TransformedArguments.Message) {
4347
if (isNullishOrEmpty(options.message.content) && isNullishOrEmpty(options.message.reactions)) {
4448
const content = resolveUserKey(interaction, Root.NoContent);

0 commit comments

Comments
 (0)