Skip to content

Commit

Permalink
fix(paginatedmessage): fix checks for actionIsButtonOrMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Apr 27, 2023
1 parent c080740 commit 3f5d500
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -22,7 +22,14 @@ import type {
} from './PaginatedMessageTypes';

export function actionIsButtonOrMenu(action: PaginatedMessageAction): action is PaginatedMessageActionButton | PaginatedMessageActionMenu {
return action.type === ComponentType.SelectMenu || action.type === ComponentType.Button;
return (
action.type === ComponentType.Button ||
action.type === ComponentType.StringSelect ||
action.type === ComponentType.UserSelect ||
action.type === ComponentType.RoleSelect ||
action.type === ComponentType.MentionableSelect ||
action.type === ComponentType.ChannelSelect
);
}

export function isMessageButtonInteractionData(interaction: ActionRowComponentOptions): interaction is ButtonComponentData {
Expand Down

0 comments on commit 3f5d500

Please sign in to comment.