aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/extensions')
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts23
-rw-r--r--src/lib/extensions/discord.js/ExtendedGuild.ts1
2 files changed, 13 insertions, 11 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 855c252..9ca02a2 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -15,6 +15,7 @@ import { patch, type PatchedElements } from '@notenoughupdates/events-intercept'
import * as Sentry from '@sentry/node';
import {
AkairoClient,
+ ArgumentTypeCaster,
ContextMenuCommandHandler,
version as akairoVersion,
type ArgumentPromptData,
@@ -406,17 +407,17 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
};
this.listenerHandler.setEmitters(emitters);
this.commandHandler.resolver.addTypes({
- duration,
- contentWithDuration,
- permission,
- snowflake,
- discordEmoji,
- roleWithDuration,
- abbreviatedNumber,
- durationSeconds,
- globalUser,
- messageLink,
- tinyColor
+ duration: <ArgumentTypeCaster>duration,
+ contentWithDuration: <ArgumentTypeCaster>contentWithDuration,
+ permission: <ArgumentTypeCaster>permission,
+ snowflake: <ArgumentTypeCaster>snowflake,
+ discordEmoji: <ArgumentTypeCaster>discordEmoji,
+ roleWithDuration: <ArgumentTypeCaster>roleWithDuration,
+ abbreviatedNumber: <ArgumentTypeCaster>abbreviatedNumber,
+ durationSeconds: <ArgumentTypeCaster>durationSeconds,
+ globalUser: <ArgumentTypeCaster>globalUser,
+ messageLink: <ArgumentTypeCaster>messageLink,
+ tinyColor: <ArgumentTypeCaster>tinyColor
});
this.sentry.setTag('process', process.pid.toString());
diff --git a/src/lib/extensions/discord.js/ExtendedGuild.ts b/src/lib/extensions/discord.js/ExtendedGuild.ts
index e55851b..3dce7ca 100644
--- a/src/lib/extensions/discord.js/ExtendedGuild.ts
+++ b/src/lib/extensions/discord.js/ExtendedGuild.ts
@@ -739,6 +739,7 @@ export class ExtendedGuild extends Guild {
// todo: use enum for this
case 24 as MessageType: {
const embed = quote.embeds[0];
+ // eslint-disable-next-line deprecation/deprecation
assert.equal(embed.data.type, 'auto_moderation_message');
const ruleName = embed.fields!.find((f) => f.name === 'rule_name')!.value;
const channelId = embed.fields!.find((f) => f.name === 'channel_id')!.value;