Skip to content

Commit

Permalink
Format ./src/interactions/decorators.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiomaleQ committed Sep 5, 2023
1 parent 5134c91 commit f57524b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/interactions/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { ApplicationCommandsModule } from './commandModule.ts'
import { ApplicationCommandInteraction } from '../structures/applicationCommand.ts'
import { GatewayIntents } from '../types/gateway.ts'
import { ApplicationCommandType } from '../types/applicationCommand.ts'
import { MessageComponentInteraction } from '../structures/messageComponents.ts';
import { ModalSubmitInteraction } from '../structures/modalSubmitInteraction.ts';
import { MessageComponentInteraction } from '../structures/messageComponents.ts'
import { ModalSubmitInteraction } from '../structures/modalSubmitInteraction.ts'

/** Type extension that adds the `_decoratedAppCmd` list. */
interface DecoratedAppExt {
Expand Down Expand Up @@ -398,11 +398,15 @@ export function userContextMenu(name?: string): ApplicationCommandDecorator {
* First argument that is `name` is optional and can be
* inferred from method name.
*/
export function messageComponent(customID?: string): MessageComponentDecorator<MessageComponentInteraction> {
export function messageComponent(
customID?: string
): MessageComponentDecorator<MessageComponentInteraction> {
return function (
client: ApplicationCommandClientExt,
prop: string,
desc: TypedPropertyDescriptor<ComponentInteractionCallback<MessageComponentInteraction>>
desc: TypedPropertyDescriptor<
ComponentInteractionCallback<MessageComponentInteraction>
>
) {
if (client._decoratedComponents === undefined)
client._decoratedComponents = []
Expand Down Expand Up @@ -435,11 +439,15 @@ export function messageComponent(customID?: string): MessageComponentDecorator<M
* First argument that is `name` is optional and can be
* inferred from method name.
*/
export function modalHandler(customID?: string): MessageComponentDecorator<ModalSubmitInteraction> {
export function modalHandler(
customID?: string
): MessageComponentDecorator<ModalSubmitInteraction> {
return function (
client: ApplicationCommandClientExt,
prop: string,
desc: TypedPropertyDescriptor<ComponentInteractionCallback<ModalSubmitInteraction>>
desc: TypedPropertyDescriptor<
ComponentInteractionCallback<ModalSubmitInteraction>
>
) {
if (client._decoratedComponents === undefined)
client._decoratedComponents = []
Expand Down

0 comments on commit f57524b

Please sign in to comment.