Skip to content

Commit

Permalink
feat(emoji): add contexts for the message context command (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranet authored Nov 2, 2024
1 parent 6fe202a commit da7bc17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commands/emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export class UserCommand extends Command {
: this.getDiscordResponse(interaction, data);
}

@RegisterMessageCommand((builder) => applyNameLocalizedBuilder(builder, Root.ExtractEmojisName))
@RegisterMessageCommand((builder) =>
applyNameLocalizedBuilder(builder, Root.ExtractEmojisName)
.setIntegrationTypes(ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall)
.setContexts(InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel)
)
public onMessageContext(interaction: Command.MessageInteraction, options: TransformedArguments.Message) {
if (isNullishOrEmpty(options.message.content) && isNullishOrEmpty(options.message.reactions)) {
const content = resolveUserKey(interaction, Root.NoContent);
Expand Down

0 comments on commit da7bc17

Please sign in to comment.