Skip to content

Commit

Permalink
chore(*): formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
almostSouji committed Dec 17, 2024
1 parent 4269150 commit 4ba59c3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/deployFunctions/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function deploy(data: any, dev = false) {
PrerepeaseApplicationCommandContextType.PrivateChannel,
PrerepeaseApplicationCommandContextType.BotDm,
],
})),
})),
),
}).then(async (response) => response.json());
logger.info(res as string);
Expand Down
6 changes: 3 additions & 3 deletions src/functions/modals/testTagModalSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export async function testTagModalSubmit(res: Response, message: APIModalSubmitI
color: hasErrors
? VALIDATION_FAIL_COLOR
: hasWarnings
? VALIDATION_WARNING_COLOR
: VALIDATION_SUCCESS_COLOR,
? VALIDATION_WARNING_COLOR
: VALIDATION_SUCCESS_COLOR,
description: [
`**Name:** \`${parsedTag.name}\``,
`**Keywords:** ${parsedTag.body.keywords.map((key) => `\`${key}\``).join(', ')}`,
Expand All @@ -124,7 +124,7 @@ export async function testTagModalSubmit(res: Response, message: APIModalSubmitI
type: ComponentType.ActionRow,
components: buttons,
},
]
]
: [],
},
},
Expand Down
44 changes: 22 additions & 22 deletions src/util/argumentsOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
type TypeIdToType<T, O, C> = T extends ApplicationCommandOptionType.Subcommand
? ArgumentsOfRaw<O>
: T extends ApplicationCommandOptionType.SubcommandGroup
? ArgumentsOfRaw<O>
: T extends ApplicationCommandOptionType.String
? C extends readonly { value: string }[]
? C[number]['value']
: string
: T extends ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number
? C extends readonly { value: number }[]
? C[number]['value']
: number
: T extends ApplicationCommandOptionType.Boolean
? boolean
: T extends ApplicationCommandOptionType.User
? string
: T extends ApplicationCommandOptionType.Channel
? string
: T extends ApplicationCommandOptionType.Role
? string
: T extends ApplicationCommandOptionType.Mentionable
? string
: never;
? ArgumentsOfRaw<O>
: T extends ApplicationCommandOptionType.String
? C extends readonly { value: string }[]
? C[number]['value']
: string
: T extends ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number
? C extends readonly { value: number }[]
? C[number]['value']
: number
: T extends ApplicationCommandOptionType.Boolean
? boolean
: T extends ApplicationCommandOptionType.User
? string
: T extends ApplicationCommandOptionType.Channel
? string
: T extends ApplicationCommandOptionType.Role
? string
: T extends ApplicationCommandOptionType.Mentionable
? string
: never;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
type OptionToObject<O> = O extends {
Expand All @@ -74,8 +74,8 @@ type OptionToObject<O> = O extends {
? R extends true
? { [k in K]: TypeIdToType<T, O, C> }
: T extends ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup
? { [k in K]: TypeIdToType<T, O, C> }
: { [k in K]?: TypeIdToType<T, O, C> }
? { [k in K]: TypeIdToType<T, O, C> }
: { [k in K]?: TypeIdToType<T, O, C> }
: never
: never;

Expand Down
1 change: 0 additions & 1 deletion tags/tags.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1218,4 +1218,3 @@ Bots cannot send messages in partial group dm channels.
Use `if ('send' in channel)` or compare `channel.type` to mitigate this.
A fix will be implemented in 14.16.2, where you can use `channel.isSendable()`
"""

0 comments on commit 4ba59c3

Please sign in to comment.