From 840cca672d681c36f980a06fb79a4e2c01bd69ac Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Tue, 25 Jan 2022 23:47:40 -0500 Subject: I love breaking changes!!!! --- src/lib/extensions/discord-akairo/BushClient.ts | 1 + .../extensions/discord-akairo/BushClientUtil.ts | 25 +--------------------- 2 files changed, 2 insertions(+), 24 deletions(-) (limited to 'src/lib/extensions/discord-akairo') 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 extends AkairoClient 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, @@ -196,27 +194,6 @@ export class BushClientUtil extends ClientUtil { return client.consts.emojis; } - /** - * 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. -- cgit