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.ts1
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts25
-rw-r--r--src/lib/extensions/discord.js/BushButtonInteraction.ts2
-rw-r--r--src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts2
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts4
-rw-r--r--src/lib/extensions/discord.js/BushSelectMenuInteraction.ts2
6 files changed, 7 insertions, 29 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 01620a8..712d610 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -190,6 +190,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
super({
ownerID: config.owners,
intents: Object.values(Intents.FLAGS).reduce((acc, p) => acc | p, 0),
+ partials: ['USER', 'CHANNEL', 'GUILD_MEMBER', 'MESSAGE', 'REACTION', 'GUILD_SCHEDULED_EVENT'],
presence: {
activities: [
{
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index 79aa4c1..968a805 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -16,21 +16,19 @@ import {
type Pronoun,
type PronounCode
} from '#lib';
-import type { APIMessage } from '@discordjs/builders/node_modules/discord-api-types';
import { humanizeDuration } from '@notenoughupdates/humanize-duration';
import { exec } from 'child_process';
import deepLock from 'deep-lock';
import { ClientUtil, Util as AkairoUtil } from 'discord-akairo';
+import type { APIMessage } from 'discord-api-types';
import {
Constants as DiscordConstants,
GuildMember,
Message,
- MessageEmbed,
Permissions,
ThreadMember,
User,
Util as DiscordUtil,
- type ColorResolvable,
type CommandInteraction,
type InteractionReplyOptions,
type Snowflake,
@@ -197,27 +195,6 @@ export class BushClientUtil extends ClientUtil {
}
/**
- * A simple utility to create and embed with the needed style for the bot.
- * @param color The color to set the embed to.
- * @param author The author to set the embed to.
- * @returns The generated embed.
- */
- public createEmbed(color?: ColorResolvable, author?: User | GuildMember): MessageEmbed {
- if (author instanceof GuildMember) {
- author = author.user; // Convert to User if GuildMember
- }
- let embed = new MessageEmbed().setTimestamp();
- if (author)
- embed = embed.setAuthor({
- name: author.username,
- iconURL: author.displayAvatarURL(),
- url: `https://discord.com/users/${author.id}`
- });
- if (color) embed = embed.setColor(color);
- return embed;
- }
-
- /**
* Fetches a user's uuid from the mojang api.
* @param username The username to get the uuid of.
* @returns The the uuid of the user.
diff --git a/src/lib/extensions/discord.js/BushButtonInteraction.ts b/src/lib/extensions/discord.js/BushButtonInteraction.ts
index 191ad5c..b7ad77c 100644
--- a/src/lib/extensions/discord.js/BushButtonInteraction.ts
+++ b/src/lib/extensions/discord.js/BushButtonInteraction.ts
@@ -1,5 +1,5 @@
import type { BushClient, BushGuild, BushGuildMember, BushGuildTextBasedChannel, BushTextBasedChannel, BushUser } from '#lib';
-import type { APIInteractionGuildMember } from '@discordjs/builders/node_modules/discord-api-types/payloads/v9/_interactions/base';
+import type { APIInteractionGuildMember } from 'discord-api-types';
import { ButtonInteraction, type CacheType, type CacheTypeReducer } from 'discord.js';
import type { RawMessageButtonInteractionData } from 'discord.js/typings/rawDataTypes';
diff --git a/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts
index 56bef21..4d68f79 100644
--- a/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts
+++ b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts
@@ -10,7 +10,7 @@ import type {
BushTextBasedChannel,
BushUser
} from '#lib';
-import type { APIInteractionGuildMember } from '@discordjs/builders/node_modules/discord-api-types';
+import type { APIInteractionGuildMember } from 'discord-api-types';
import { ChatInputCommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js';
import type { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes';
diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts
index 9f114b6..bbef953 100644
--- a/src/lib/extensions/discord.js/BushGuild.ts
+++ b/src/lib/extensions/discord.js/BushGuild.ts
@@ -367,11 +367,11 @@ export class BushGuild extends Guild {
await channel.send({
embeds: [
{
- author: { name: moderator.user.tag, iconURL: moderator.displayAvatarURL() },
+ author: { name: moderator.user.tag, icon_url: moderator.displayAvatarURL() },
title: `This channel has been ${options.unlock ? 'un' : ''}locked`,
description: options.reason ?? 'No reason provided',
color: options.unlock ? util.colors.discord.GREEN : util.colors.discord.RED,
- timestamp: Date.now()
+ timestamp: new Date().toISOString()
}
]
});
diff --git a/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts b/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts
index 23e2453..2c7c329 100644
--- a/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts
+++ b/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts
@@ -1,5 +1,5 @@
import type { BushClient, BushGuild, BushGuildMember, BushGuildTextBasedChannel, BushTextBasedChannel, BushUser } from '#lib';
-import type { APIInteractionGuildMember } from '@discordjs/builders/node_modules/discord-api-types';
+import type { APIInteractionGuildMember } from 'discord-api-types';
import { SelectMenuInteraction, type CacheType, type CacheTypeReducer } from 'discord.js';
import type { RawMessageSelectMenuInteractionData } from 'discord.js/typings/rawDataTypes';