Skip to content

Commit

Permalink
bump dependencies and fix url
Browse files Browse the repository at this point in the history
  • Loading branch information
IRONM00N committed Jan 15, 2024
1 parent 6c48cb5 commit 93d00db
Show file tree
Hide file tree
Showing 7 changed files with 239 additions and 234 deletions.
2 changes: 1 addition & 1 deletion lib/utils/BotClientUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class BotClientUtils {
* The hastebin urls used to post to hastebin, attempts to post in order
*/
#hasteURLs: string[] = [
'https://haste.tanzanite.dev/',
'https://haste.tanzanite.dev',
'https://hst.sh',
'https://hasteb.in',
'https://mystb.in',
Expand Down
5 changes: 3 additions & 2 deletions lib/utils/ErrorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ export async function handleCommandError(

void client.console.error(
`${isSlash ? 'slashC' : 'c'}ommandError`,
`an error occurred with the <<${command}>> ${isSlash ? 'slash ' : ''}command in <<${channel}>> triggered by <<${message
?.author?.tag}>>:\n${formatError(error, true)}`,
`an error occurred with the <<${command}>> ${isSlash ? 'slash ' : ''}command in <<${channel}>> triggered by <<${
message?.author?.tag
}>>:\n${formatError(error, true)}`,
false
);

Expand Down
43 changes: 22 additions & 21 deletions lib/utils/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,30 @@ type Primitive = string | number | boolean | bigint | symbol | undefined | null;
type Builtin = Primitive | Function | Date | Error | RegExp;
type IsAny<Type> = 0 extends 1 & Type ? true : false;
type IsUnknown<Type> = IsAny<Type> extends true ? false : unknown extends Type ? true : false;
type DeepWritable<Type> = Type extends Exclude<Builtin, Error>
? Type
: Type extends Map<infer Key, infer Value>
? Map<DeepWritable<Key>, DeepWritable<Value>>
: Type extends ReadonlyMap<infer Key, infer Value>
type DeepWritable<Type> =
Type extends Exclude<Builtin, Error>
? Type
: Type extends Map<infer Key, infer Value>
? Map<DeepWritable<Key>, DeepWritable<Value>>
: Type extends WeakMap<infer Key, infer Value>
? WeakMap<DeepWritable<Key>, DeepWritable<Value>>
: Type extends Set<infer Values>
? Set<DeepWritable<Values>>
: Type extends ReadonlySet<infer Values>
: Type extends ReadonlyMap<infer Key, infer Value>
? Map<DeepWritable<Key>, DeepWritable<Value>>
: Type extends WeakMap<infer Key, infer Value>
? WeakMap<DeepWritable<Key>, DeepWritable<Value>>
: Type extends Set<infer Values>
? Set<DeepWritable<Values>>
: Type extends WeakSet<infer Values>
? WeakSet<DeepWritable<Values>>
: Type extends Promise<infer Value>
? Promise<DeepWritable<Value>>
: Type extends {}
? {
-readonly [Key in keyof Type]: DeepWritable<Type[Key]>;
}
: IsUnknown<Type> extends true
? unknown
: Type;
: Type extends ReadonlySet<infer Values>
? Set<DeepWritable<Values>>
: Type extends WeakSet<infer Values>
? WeakSet<DeepWritable<Values>>
: Type extends Promise<infer Value>
? Promise<DeepWritable<Value>>
: Type extends {}
? {
-readonly [Key in keyof Type]: DeepWritable<Type[Key]>;
}
: IsUnknown<Type> extends true
? unknown
: Type;
/* end taken from ts-essentials */

/**
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
"@discordjs/rest": "^2.2.0",
"@ironm00n/nbt-ts": "^1.4.0",
"@napi-rs/canvas": "^0.1.44",
"@sentry/integrations": "^7.91.0",
"@sentry/node": "^7.91.0",
"@sentry/tracing": "^7.91.0",
"@sentry/integrations": "^7.93.0",
"@sentry/node": "^7.93.0",
"@sentry/tracing": "^7.93.0",
"@tanzanite/deep-lock": "^1.1.1",
"@tanzanite/discord-akairo": "dev",
"@tanzanite/discord.js-minesweeper": "^1.2.0",
Expand All @@ -73,17 +73,17 @@
"@tanzanite/simplify-number": "^2.0.1",
"@tanzanite/wolfram-alpha": "^1.1.0",
"chalk": "^5.3.0",
"discord-api-types": "0.37.66",
"discord-api-types": "0.37.67",
"discord.js": "^14.14.1",
"fuse.js": "^7.0.0",
"googleapis": "^129.0.0",
"googleapis": "^130.0.0",
"lodash-es": "^4.17.21",
"mathjs": "12.2.1",
"mathjs": "12.3.0",
"nanoid": "^5.0.4",
"numeral": "^2.0.6",
"pg": "^8.11.3",
"pg-hstore": "^2.3.4",
"prettier": "^3.1.1",
"prettier": "^3.2.2",
"pretty-bytes": "^6.1.1",
"rimraf": "^5.0.5",
"sequelize": "6.35.2",
Expand All @@ -93,22 +93,22 @@
},
"devDependencies": {
"@sapphire/snowflake": "^3.5.2",
"@sentry/types": "^7.91.0",
"@types/eslint": "^8.56.0",
"@sentry/types": "^7.93.0",
"@types/eslint": "^8.56.2",
"@types/express": "^4.17.21",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.5",
"@types/node-fetch": "^2.6.9",
"@types/node": "^20.11.2",
"@types/node-fetch": "^2.6.10",
"@types/numeral": "^2.0.5",
"@types/pg": "^8.10.9",
"@types/tinycolor2": "^1.4.6",
"@types/validator": "^13.11.7",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@types/validator": "^13.11.8",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-deprecation": "^2.0.0",
"husky": "^8.0.0"
"husky": "^8.0.3"
},
"packageManager": "[email protected]",
"resolutions": {
Expand Down
7 changes: 4 additions & 3 deletions src/commands/config/blacklist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ export default class BlacklistCommand extends BotCommand {

const key = target instanceof User ? 'blacklistedUsers' : 'blacklistedChannels';

const success = await (global
? this.client.utils.setGlobal(key, newValue)
: message.guild!.setSetting(key, newValue, message.member as GuildMember)
const success = await (
global
? this.client.utils.setGlobal(key, newValue)
: message.guild!.setSetting(key, newValue, message.member as GuildMember)
).catch(() => false);

if (!success)
Expand Down
5 changes: 3 additions & 2 deletions src/listeners/contextCommands/contextCommandError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export default class ContextCommandErrorListener extends BotListener {

void client.console.error(
`contextCommandError`,
`an error occurred with the <<${command}>> context command in <<${channel}>> triggered by <<${interaction?.user
?.tag}>>:\n${formatError(error, true)}`,
`an error occurred with the <<${command}>> context command in <<${channel}>> triggered by <<${
interaction?.user?.tag
}>>:\n${formatError(error, true)}`,
false
);

Expand Down
Loading

0 comments on commit 93d00db

Please sign in to comment.