diff options
Diffstat (limited to 'src/lib/extensions')
4 files changed, 6 insertions, 28 deletions
diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts index fb4f84c..b993215 100644 --- a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts +++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts @@ -28,15 +28,9 @@ export class BushApplicationCommandManager< data: ApplicationCommandData, guildId: Snowflake ): Promise<BushApplicationCommand>; - public fetch( - id: Snowflake, - options: FetchApplicationCommandOptions & { guildId: Snowflake } - ): Promise<BushApplicationCommand>; + public fetch(id: Snowflake, options: FetchApplicationCommandOptions & { guildId: Snowflake }): Promise<BushApplicationCommand>; public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandScope>; - public fetch( - id?: Snowflake, - options?: FetchApplicationCommandOptions - ): Promise<Collection<Snowflake, ApplicationCommandScope>>; + public fetch(id?: Snowflake, options?: FetchApplicationCommandOptions): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, ApplicationCommandScope>>; public set(commands: ApplicationCommandData[], guildId: Snowflake): Promise<Collection<Snowflake, BushApplicationCommand>>; private static transformCommand( diff --git a/src/lib/extensions/discord.js/BushCommandInteraction.ts b/src/lib/extensions/discord.js/BushCommandInteraction.ts index 56cdb75..b307bbc 100644 --- a/src/lib/extensions/discord.js/BushCommandInteraction.ts +++ b/src/lib/extensions/discord.js/BushCommandInteraction.ts @@ -10,14 +10,7 @@ import { BushGuildMember } from './BushGuildMember'; import { BushRole } from './BushRole'; import { BushUser } from './BushUser'; -export type BushGuildResolvable = - | BushGuild - | BushGuildChannel - | BushGuildMember - | BushGuildEmoji - | Invite - | BushRole - | Snowflake; +export type BushGuildResolvable = BushGuild | BushGuildChannel | BushGuildMember | BushGuildEmoji | Invite | BushRole | Snowflake; export class BushCommandInteraction extends CommandInteraction { public constructor(client: BushClient, data: RawCommandInteractionData) { diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index 51c2795..487ff9a 100644 --- a/src/lib/extensions/discord.js/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -77,9 +77,7 @@ export class BushGuild extends Guild { duration?: number; deleteDays?: number; evidence?: string; - }): Promise< - 'success' | 'missing permissions' | 'error banning' | 'error creating modlog entry' | 'error creating ban entry' - > { + }): Promise<'success' | 'missing permissions' | 'error banning' | 'error creating modlog entry' | 'error creating ban entry'> { // checks if (!this.me!.permissions.has('BAN_MEMBERS')) return 'missing permissions'; diff --git a/src/lib/extensions/discord.js/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts index 34054c8..b23ff33 100644 --- a/src/lib/extensions/discord.js/BushGuildMember.ts +++ b/src/lib/extensions/discord.js/BushGuildMember.ts @@ -95,11 +95,7 @@ export class BushGuildMember extends GuildMember { : undefined; const dmSuccess = await this.send({ content: `You have been ${punishment} in **${this.guild.name}** ${ - duration !== null && duration !== undefined - ? duration - ? `for ${util.humanizeDuration(duration)} ` - : 'permanently ' - : '' + duration !== null && duration !== undefined ? (duration ? `for ${util.humanizeDuration(duration)} ` : 'permanently ') : '' }for **${reason?.trim() ?? 'No reason provided'}**.`, embeds: dmEmbed ? [dmEmbed] : undefined }).catch(() => false); @@ -231,10 +227,7 @@ export class BushGuildMember extends GuildMember { return 'success'; })(); - if ( - !['error removing role', 'error creating modlog entry', 'error removing role entry'].includes(ret) && - options.addToModlog - ) + if (!['error removing role', 'error creating modlog entry', 'error removing role entry'].includes(ret) && options.addToModlog) client.emit( 'bushPunishRoleRemove', this, |