aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-27 16:57:39 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-27 16:57:39 -0400
commit877537043dd2a8ba16037f061716d9c6f7a5764a (patch)
tree9e9fd2c69b415d2f548e97d0d6abbf3bc8a314a8 /src/lib/extensions
parenta1ab06dcfccef90192b90910aecdddbc505eca00 (diff)
downloadtanzanite-877537043dd2a8ba16037f061716d9c6f7a5764a.tar.gz
tanzanite-877537043dd2a8ba16037f061716d9c6f7a5764a.tar.bz2
tanzanite-877537043dd2a8ba16037f061716d9c6f7a5764a.zip
change printWidth to 130 and update dependecies
Diffstat (limited to 'src/lib/extensions')
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts10
-rw-r--r--src/lib/extensions/discord.js/BushCommandInteraction.ts9
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts4
-rw-r--r--src/lib/extensions/discord.js/BushGuildMember.ts11
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,