aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-04-20 18:37:22 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-04-20 18:37:22 -0400
commitf01be2e3ce820e5737416180efa3e5852ece72c4 (patch)
treea972af929940173e4e2d9f843124a8dfb293bc90 /src/lib
parentbcb3dc5fcd21f7626d4c5a8c009dca5658a4436b (diff)
downloadtanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.gz
tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.bz2
tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.zip
fix invite link, remove store channel, update to use builder methods, fix breaking changes
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/common/AutoMod.ts22
-rw-r--r--src/lib/common/ButtonPaginator.ts35
-rw-r--r--src/lib/common/ConfirmationPrompt.ts8
-rw-r--r--src/lib/common/DeleteButton.ts8
-rw-r--r--src/lib/common/util/Moderation.ts8
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts24
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts18
-rw-r--r--src/lib/extensions/discord-akairo/BushCommand.ts5
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommandManager.ts2
-rw-r--r--src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts2
-rw-r--r--src/lib/extensions/discord.js/BushButtonInteraction.ts2
-rw-r--r--src/lib/extensions/discord.js/BushCategoryChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts32
-rw-r--r--src/lib/extensions/discord.js/BushChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts2
-rw-r--r--src/lib/extensions/discord.js/BushClientEvents.ts11
-rw-r--r--src/lib/extensions/discord.js/BushDMChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts2
-rw-r--r--src/lib/extensions/discord.js/BushGuildChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushGuildChannelManager.ts32
-rw-r--r--src/lib/extensions/discord.js/BushMessageManager.ts12
-rw-r--r--src/lib/extensions/discord.js/BushModalSubmitInteraction.ts9
-rw-r--r--src/lib/extensions/discord.js/BushSelectMenuInteraction.ts2
-rw-r--r--src/lib/extensions/discord.js/BushStoreChannel.ts46
-rw-r--r--src/lib/extensions/discord.js/BushTextChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushThreadChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/BushVoiceChannel.ts3
-rw-r--r--src/lib/extensions/discord.js/other.ts7
-rw-r--r--src/lib/index.ts1
-rw-r--r--src/lib/utils/BushConstants.ts59
-rw-r--r--src/lib/utils/BushLogger.ts12
31 files changed, 148 insertions, 234 deletions
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts
index db3e709..5534728 100644
--- a/src/lib/common/AutoMod.ts
+++ b/src/lib/common/AutoMod.ts
@@ -1,7 +1,15 @@
import { banResponse, Moderation, type BushButtonInteraction, type BushMessage } from '#lib';
import assert from 'assert';
import chalk from 'chalk';
-import { ActionRow, ButtonComponent, ButtonStyle, Embed, GuildMember, PermissionFlagsBits, type TextChannel } from 'discord.js';
+import {
+ ActionRowBuilder,
+ ButtonBuilder,
+ ButtonStyle,
+ EmbedBuilder,
+ GuildMember,
+ PermissionFlagsBits,
+ type TextChannel
+} from 'discord.js';
/**
* Handles auto moderation functionality.
@@ -153,7 +161,7 @@ export class AutoMod {
const color = this.punish({ severity: Severity.TEMP_MUTE, reason: 'everyone mention and scam phrase' } as BadWordDetails);
void this.message.guild!.sendLogChannel('automod', {
embeds: [
- new Embed()
+ new EmbedBuilder()
.setTitle(`[Severity ${Severity.TEMP_MUTE}] Mention Scam Deleted`)
.setDescription(
`**User:** ${this.message.author} (${this.message.author.tag})\n**Sent From:** <#${this.message.channel.id}> [Jump to context](${this.message.url})`
@@ -163,8 +171,8 @@ export class AutoMod {
.setTimestamp()
],
components: [
- new ActionRow().addComponents(
- new ButtonComponent({
+ new ActionRowBuilder<ButtonBuilder>().addComponents(
+ new ButtonBuilder({
style: ButtonStyle.Danger,
label: 'Ban User',
customId: `automod;ban;${this.message.author.id};everyone mention and scam phrase`
@@ -316,7 +324,7 @@ export class AutoMod {
await this.message.guild!.sendLogChannel('automod', {
embeds: [
- new Embed()
+ new EmbedBuilder()
.setTitle(`[Severity ${highestOffence.severity}] Automod Action Performed`)
.setDescription(
`**User:** ${this.message.author} (${this.message.author.tag})\n**Sent From:** <#${
@@ -331,8 +339,8 @@ export class AutoMod {
components:
highestOffence.severity >= 2
? [
- new ActionRow().addComponents(
- new ButtonComponent({
+ new ActionRowBuilder<ButtonBuilder>().addComponents(
+ new ButtonBuilder({
style: ButtonStyle.Danger,
label: 'Ban User',
customId: `automod;ban;${this.message.author.id};${highestOffence.reason}`
diff --git a/src/lib/common/ButtonPaginator.ts b/src/lib/common/ButtonPaginator.ts
index e3d4207..59dcb68 100644
--- a/src/lib/common/ButtonPaginator.ts
+++ b/src/lib/common/ButtonPaginator.ts
@@ -1,14 +1,7 @@
import { DeleteButton, type BushMessage, type BushSlashMessage } from '#lib';
import { CommandUtil } from 'discord-akairo';
-import { APIEmbed } from 'discord-api-types/v9';
-import {
- ActionRow,
- ButtonComponent,
- ButtonStyle,
- Embed,
- type MessageActionRowComponent,
- type MessageComponentInteraction
-} from 'discord.js';
+import { APIEmbed } from 'discord-api-types/v10';
+import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, type MessageComponentInteraction } from 'discord.js';
/**
* Sends multiple embeds with controls to switch between them
@@ -22,7 +15,7 @@ export class ButtonPaginator {
/**
* The embeds to paginate
*/
- protected embeds: Embed[] | APIEmbed[];
+ protected embeds: EmbedBuilder[] | APIEmbed[];
/**
* The optional text to send with the paginator
@@ -53,7 +46,7 @@ export class ButtonPaginator {
*/
protected constructor(
message: BushMessage | BushSlashMessage,
- embeds: Embed[] | APIEmbed[],
+ embeds: EmbedBuilder[] | APIEmbed[],
text: string | null,
deleteOnExit: boolean,
startOn: number
@@ -66,8 +59,8 @@ export class ButtonPaginator {
// add footers
for (let i = 0; i < embeds.length; i++) {
- if (embeds[i] instanceof Embed) {
- (embeds[i] as Embed).setFooter({ text: `Page ${(i + 1).toLocaleString()}/${embeds.length.toLocaleString()}` });
+ if (embeds[i] instanceof EmbedBuilder) {
+ (embeds[i] as EmbedBuilder).setFooter({ text: `Page ${(i + 1).toLocaleString()}/${embeds.length.toLocaleString()}` });
} else {
(embeds[i] as APIEmbed).footer = {
text: `Page ${(i + 1).toLocaleString()}/${embeds.length.toLocaleString()}`
@@ -177,33 +170,33 @@ export class ButtonPaginator {
* @param disableAll Whether to disable all buttons
* @returns The generated {@link ActionRow}
*/
- protected getPaginationRow(disableAll = false): ActionRow<MessageActionRowComponent> {
- return new ActionRow().addComponents(
- new ButtonComponent({
+ protected getPaginationRow(disableAll = false) {
+ return new ActionRowBuilder<ButtonBuilder>().addComponents(
+ new ButtonBuilder({
style: ButtonStyle.Primary,
customId: 'paginate_beginning',
emoji: PaginateEmojis.BEGINNING,
disabled: disableAll || this.curPage === 0
}),
- new ButtonComponent({
+ new ButtonBuilder({
style: ButtonStyle.Primary,
customId: 'paginate_back',
emoji: PaginateEmojis.BACK,
disabled: disableAll || this.curPage === 0
}),
- new ButtonComponent({
+ new ButtonBuilder({
style: ButtonStyle.Primary,
customId: 'paginate_stop',
emoji: PaginateEmojis.STOP,
disabled: disableAll
}),
- new ButtonComponent({
+ new ButtonBuilder({
style: ButtonStyle.Primary,
customId: 'paginate_next',
emoji: PaginateEmojis.FORWARD,
disabled: disableAll || this.curPage === this.numPages - 1
}),
- new ButtonComponent({
+ new ButtonBuilder({
style: ButtonStyle.Primary,
customId: 'paginate_end',
emoji: PaginateEmojis.END,
@@ -222,7 +215,7 @@ export class ButtonPaginator {
*/
public static async send(
message: BushMessage | BushSlashMessage,
- embeds: (Embed | APIEmbed)[],
+ embeds: EmbedBuilder[] | APIEmbed[],
text: string | null = null,
deleteOnExit = true,
startOn = 1
diff --git a/src/lib/common/ConfirmationPrompt.ts b/src/lib/common/ConfirmationPrompt.ts
index 4ff00ce..e86c236 100644
--- a/src/lib/common/ConfirmationPrompt.ts
+++ b/src/lib/common/ConfirmationPrompt.ts
@@ -1,5 +1,5 @@
import { type BushMessage, type BushSlashMessage } from '#lib';
-import { ActionRow, ButtonComponent, ButtonStyle, type MessageComponentInteraction, type MessageOptions } from 'discord.js';
+import { ActionRowBuilder, ButtonBuilder, ButtonStyle, type MessageComponentInteraction, type MessageOptions } from 'discord.js';
/**
* Sends a message with buttons for the user to confirm or cancel the action.
@@ -29,9 +29,9 @@ export class ConfirmationPrompt {
*/
protected async send(): Promise<boolean> {
this.messageOptions.components = [
- new ActionRow().addComponents(
- new ButtonComponent({ style: ButtonStyle.Success, customId: 'confirmationPrompt_confirm', label: 'Yes' }),
- new ButtonComponent({ style: ButtonStyle.Danger, customId: 'confirmationPrompt_cancel', label: 'No' })
+ new ActionRowBuilder<ButtonBuilder>().addComponents(
+ new ButtonBuilder({ style: ButtonStyle.Success, customId: 'confirmationPrompt_confirm', label: 'Yes' }),
+ new ButtonBuilder({ style: ButtonStyle.Danger, customId: 'confirmationPrompt_cancel', label: 'No' })
)
];
diff --git a/src/lib/common/DeleteButton.ts b/src/lib/common/DeleteButton.ts
index 0a9fd79..4874f78 100644
--- a/src/lib/common/DeleteButton.ts
+++ b/src/lib/common/DeleteButton.ts
@@ -1,8 +1,8 @@
import { PaginateEmojis, type BushMessage, type BushSlashMessage } from '#lib';
import { CommandUtil } from 'discord-akairo';
import {
- ActionRow,
- ButtonComponent,
+ ActionRowBuilder,
+ ButtonBuilder,
ButtonStyle,
MessageComponentInteraction,
MessageEditOptions,
@@ -66,8 +66,8 @@ export class DeleteButton {
*/
protected updateComponents(edit = false, disable = false): void {
this.messageOptions.components = [
- new ActionRow().addComponents(
- new ButtonComponent({
+ new ActionRowBuilder<ButtonBuilder>().addComponents(
+ new ButtonBuilder({
style: ButtonStyle.Primary,
customId: 'paginate__stop',
emoji: PaginateEmojis.STOP,
diff --git a/src/lib/common/util/Moderation.ts b/src/lib/common/util/Moderation.ts
index afe220c..f388121 100644
--- a/src/lib/common/util/Moderation.ts
+++ b/src/lib/common/util/Moderation.ts
@@ -11,7 +11,7 @@ import {
type ModLogType
} from '#lib';
import assert from 'assert';
-import { ActionRow, ButtonComponent, ButtonStyle, Embed, PermissionFlagsBits, type Snowflake } from 'discord.js';
+import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, PermissionFlagsBits, type Snowflake } from 'discord.js';
enum punishMap {
'warned' = 'warn',
@@ -265,7 +265,7 @@ export class Moderation {
const ending = await options.guild.getSetting('punishmentEnding');
const dmEmbed =
ending && ending.length && options.sendFooter
- ? new Embed().setDescription(ending).setColor(util.colors.newBlurple)
+ ? new EmbedBuilder().setDescription(ending).setColor(util.colors.newBlurple)
: undefined;
const appealsEnabled = !!(
@@ -286,9 +286,9 @@ export class Moderation {
let components;
if (appealsEnabled && options.modlog)
components = [
- new ActionRow({
+ new ActionRowBuilder<ButtonBuilder>({
components: [
- new ButtonComponent({
+ new ButtonBuilder({
customId: `appeal;${this.punishmentToPresentTense(options.punishment)};${options.guild.id};${client.users.resolveId(
options.user
)};${options.modlog}`,
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 2fb559c..6516161 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -22,10 +22,11 @@ import type {
} from '#lib';
import { patch, type PatchedElements } from '@notenoughupdates/events-intercept';
import * as Sentry from '@sentry/node';
-import { AkairoClient, ContextMenuCommandHandler, version as akairoVersion } from 'discord-akairo';
-import { GatewayIntentBits } from 'discord-api-types/v9';
+import { AkairoClient, ContextMenuCommandHandler, PromptContentModifier, version as akairoVersion } from 'discord-akairo';
+import { GatewayIntentBits } from 'discord-api-types/v10';
import {
ActivityType,
+ MessagePayload,
Options,
Partials,
Structures,
@@ -36,7 +37,6 @@ import {
type Message,
type MessageEditOptions,
type MessageOptions,
- type MessagePayload,
type ReplyMessageOptions,
type Snowflake,
type WebhookEditMessageOptions
@@ -78,7 +78,6 @@ import { BushNewsChannel } from '../discord.js/BushNewsChannel.js';
import { BushPresence } from '../discord.js/BushPresence.js';
import { BushRole } from '../discord.js/BushRole.js';
import { BushSelectMenuInteraction } from '../discord.js/BushSelectMenuInteraction.js';
-import { BushStoreChannel } from '../discord.js/BushStoreChannel.js';
import { BushTextChannel } from '../discord.js/BushTextChannel.js';
import { BushThreadChannel } from '../discord.js/BushThreadChannel.js';
import { BushThreadMember } from '../discord.js/BushThreadMember.js';
@@ -235,6 +234,17 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
directory: path.join(__dirname, '..', '..', '..', 'tasks'),
automateCategories: true
});
+
+ const modify: PromptContentModifier = async (message, text, data) => {
+ const ending = '\n\n Type **cancel** to cancel the command';
+ const options = typeof text === 'function' ? await text(message, data) : text;
+ if (typeof options === 'string') return text + ending;
+ if (options instanceof MessagePayload) {
+ if (options.options.content) options.options.content += ending;
+ } else options.content += ending;
+ return options;
+ };
+
this.commandHandler = new BushCommandHandler(this, {
directory: path.join(__dirname, '..', '..', '..', 'commands'),
prefix: async ({ guild }: Message) => {
@@ -251,9 +261,8 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
prompt: {
start: 'Placeholder argument prompt. **If you see this please tell my developers**.',
retry: 'Placeholder failed argument prompt. **If you see this please tell my developers**.',
- modifyStart: (_: Message, str: string): string => `${str}\n\n Type \`cancel\` to cancel the command`,
- modifyRetry: (_: Message, str: string): string =>
- `${str.replace('{error}', this.util.emojis.error)}\n\n Type \`cancel\` to cancel the command`,
+ modifyStart: modify,
+ modifyRetry: modify,
timeout: ':hourglass: You took too long the command has been cancelled.',
ended: 'You exceeded the maximum amount of tries the command has been cancelled',
cancel: 'The command has been cancelled',
@@ -317,7 +326,6 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
Structures.extend('VoiceChannel', () => BushVoiceChannel);
Structures.extend('CategoryChannel', () => BushCategoryChannel);
Structures.extend('NewsChannel', () => BushNewsChannel);
- Structures.extend('StoreChannel', () => BushStoreChannel);
Structures.extend('ThreadChannel', () => BushThreadChannel);
Structures.extend('GuildMember', () => BushGuildMember);
Structures.extend('ThreadMember', () => BushThreadMember);
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index e92abe7..563df3d 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -22,10 +22,10 @@ import assert from 'assert';
import { exec } from 'child_process';
import deepLock from 'deep-lock';
import { ClientUtil, Util as AkairoUtil } from 'discord-akairo';
-import { APIEmbed, APIMessage, OAuth2Scopes, Routes } from 'discord-api-types/v9';
+import { APIEmbed, APIMessage, OAuth2Scopes, Routes } from 'discord-api-types/v10';
import {
Constants as DiscordConstants,
- Embed,
+ EmbedBuilder,
GuildMember,
Message,
PermissionFlagsBits,
@@ -920,7 +920,11 @@ export class BushClientUtil extends ClientUtil {
*/
public get invite() {
return client.generateInvite({
- permissions: PermissionsBitField.All,
+ permissions:
+ PermissionsBitField.All -
+ PermissionFlagsBits.UseEmbeddedActivities -
+ PermissionFlagsBits.ViewGuildInsights -
+ PermissionFlagsBits.Stream,
scopes: [OAuth2Scopes.Bot, OAuth2Scopes.ApplicationsCommands]
});
}
@@ -970,17 +974,17 @@ export class BushClientUtil extends ClientUtil {
* @param embed The options to be applied to the (first) embed.
* @param lines Each line of the description as an element in an array.
*/
- public overflowEmbed(embed: Omit<APIEmbed, 'description'>, lines: string[], maxLength = 4096): Embed[] {
- const embeds: Embed[] = [];
+ public overflowEmbed(embed: Omit<APIEmbed, 'description'>, lines: string[], maxLength = 4096): EmbedBuilder[] {
+ const embeds: EmbedBuilder[] = [];
const makeEmbed = () => {
- embeds.push(new Embed().setColor(embed.color ?? null));
+ embeds.push(new EmbedBuilder().setColor(embed.color ?? null));
return embeds.at(-1)!;
};
for (const line of lines) {
let current = embeds.length ? embeds.at(-1)! : makeEmbed();
- const joined = current.description ? `${current.description}\n${line}` : line;
+ const joined = current.data.description ? `${current.data.description}\n${line}` : line;
if (joined.length >= maxLength) current = makeEmbed();
current.setDescription(joined);
diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts
index ff3748e..febe95a 100644
--- a/src/lib/extensions/discord-akairo/BushCommand.ts
+++ b/src/lib/extensions/discord-akairo/BushCommand.ts
@@ -18,7 +18,6 @@ import {
type BushRole,
type BushSlashMessage,
type BushStageChannel,
- type BushStoreChannel,
type BushTask,
type BushTextChannel,
type BushThreadChannel,
@@ -72,10 +71,6 @@ export interface OverriddenBaseArgumentType extends BaseArgumentType {
categoryChannels: Collection<string, BushCategoryChannel> | null;
newsChannel: BushNewsChannel | null;
newsChannels: Collection<string, BushNewsChannel> | null;
- // eslint-disable-next-line deprecation/deprecation
- storeChannel: BushStoreChannel | null;
- // eslint-disable-next-line deprecation/deprecation
- storeChannels: Collection<string, BushStoreChannel> | null;
stageChannel: BushStageChannel | null;
stageChannels: Collection<string, BushStageChannel> | null;
threadChannel: BushThreadChannel | null;
diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.ts
index 68153b9..dc27dbf 100644
--- a/src/lib/extensions/discord.js/BushApplicationCommandManager.ts
+++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.ts
@@ -6,7 +6,7 @@ import type {
BushGuildResolvable,
StripPrivate
} from '#lib';
-import type { APIApplicationCommand } from 'discord-api-types/v9';
+import type { APIApplicationCommand } from 'discord-api-types/v10';
import {
ApplicationCommandManager,
CachedManager,
diff --git a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts
index 49d4234..401f3e2 100644
--- a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts
+++ b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts
@@ -1,5 +1,5 @@
import type { BushClient, BushRoleResolvable, BushUserResolvable } from '#lib';
-import type { APIApplicationCommandPermission } from 'discord-api-types/v9';
+import type { APIApplicationCommandPermission } from 'discord-api-types/v10';
import {
ApplicationCommandPermissionType,
BaseManager,
diff --git a/src/lib/extensions/discord.js/BushButtonInteraction.ts b/src/lib/extensions/discord.js/BushButtonInteraction.ts
index 89cfabd..368d19d 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 'discord-api-types/v9';
+import type { APIInteractionGuildMember } from 'discord-api-types/v10';
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/BushCategoryChannel.ts b/src/lib/extensions/discord.js/BushCategoryChannel.ts
index 8c02a68..a2e1e1c 100644
--- a/src/lib/extensions/discord.js/BushCategoryChannel.ts
+++ b/src/lib/extensions/discord.js/BushCategoryChannel.ts
@@ -3,7 +3,6 @@ import {
BushGuildBasedChannel,
BushNewsChannel,
BushStageChannel,
- BushStoreChannel,
BushTextBasedChannel,
BushTextChannel,
BushThreadChannel,
@@ -35,8 +34,6 @@ export interface BushCategoryChannel extends CategoryChannel {
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
- // eslint-disable-next-line deprecation/deprecation
- isStore(): this is BushStoreChannel;
isThread(): this is BushThreadChannel;
isStage(): this is BushStageChannel;
isTextBased(): this is BushGuildBasedChannel & BushTextBasedChannel;
diff --git a/src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts b/src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts
index b9a7ac7..2b0d56b 100644
--- a/src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts
+++ b/src/lib/extensions/discord.js/BushCategoryChannelChildManager.ts
@@ -1,20 +1,23 @@
-/* eslint-disable deprecation/deprecation */
import type {
BushCategoryChannel,
BushGuild,
BushGuildChannelResolvable,
BushMappedChannelCategoryTypes,
BushNonCategoryGuildBasedChannel,
- BushStoreChannel,
BushTextChannel
} from '#lib';
-import type { CategoryChannelType, CategoryCreateChannelOptions, ChannelType, DataManager, Snowflake } from 'discord.js';
+import type {
+ CategoryChannelChildManager,
+ CategoryChannelType,
+ CategoryCreateChannelOptions,
+ DataManager,
+ Snowflake
+} from 'discord.js';
-export declare class BushCategoryChannelChildManager extends DataManager<
- Snowflake,
- BushNonCategoryGuildBasedChannel,
- BushGuildChannelResolvable
-> {
+export declare class BushCategoryChannelChildManager
+ extends DataManager<Snowflake, BushNonCategoryGuildBasedChannel, BushGuildChannelResolvable>
+ implements CategoryChannelChildManager
+{
private constructor(channel: BushCategoryChannel);
/**
@@ -33,20 +36,9 @@ export declare class BushCategoryChannelChildManager extends DataManager<
* @param name The name of the new channel
* @param options Options for creating the new channel
*/
- public create<T extends Exclude<CategoryChannelType, ChannelType.GuildStore>>(
+ public create<T extends CategoryChannelType>(
name: string,
options: CategoryCreateChannelOptions & { type: T }
): Promise<BushMappedChannelCategoryTypes[T]>;
- /**
- * Creates a new channel within this category.
- * <info>You cannot create a channel of type {@link ChannelType.GuildCategory} inside a CategoryChannel.</info>
- * @param name The name of the new channel
- * @param options Options for creating the new channel
- * @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information
- */
- public create(
- name: string,
- options: CategoryCreateChannelOptions & { type: ChannelType.GuildStore }
- ): Promise<BushStoreChannel>;
public create(name: string, options?: CategoryCreateChannelOptions): Promise<BushTextChannel>;
}
diff --git a/src/lib/extensions/discord.js/BushChannel.ts b/src/lib/extensions/discord.js/BushChannel.ts
index 3f0d070..e66135c 100644
--- a/src/lib/extensions/discord.js/BushChannel.ts
+++ b/src/lib/extensions/discord.js/BushChannel.ts
@@ -1,11 +1,9 @@
-/* eslint-disable deprecation/deprecation */
import type {
BushCategoryChannel,
BushClient,
BushDMChannel,
BushNewsChannel,
BushStageChannel,
- BushStoreChannel,
BushTextBasedChannel,
BushTextChannel,
BushThreadChannel,
@@ -34,7 +32,6 @@ export declare class BushChannel extends Channel {
public isVoice(): this is BushVoiceChannel;
public isCategory(): this is BushCategoryChannel;
public isNews(): this is BushNewsChannel;
- public isStore(): this is BushStoreChannel;
public isThread(): this is BushThreadChannel;
public isStage(): this is BushStageChannel;
public isTextBased(): this is BushTextBasedChannel;
diff --git a/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts b/src/lib/extensions/discord.js/BushChatInputCommandInteraction.ts
index 5dbf7b9..2491a68 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 'discord-api-types/v9';
+import type { APIInteractionGuildMember } from 'discord-api-types/v10';
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/BushClientEvents.ts b/src/lib/extensions/discord.js/BushClientEvents.ts
index 4a10ce5..fc9993e 100644
--- a/src/lib/extensions/discord.js/BushClientEvents.ts
+++ b/src/lib/extensions/discord.js/BushClientEvents.ts
@@ -97,7 +97,8 @@ export interface BushClientEvents extends AkairoClientEvents {
reaction: BushMessageReaction | PartialBushMessageReaction
];
messageDeleteBulk: [
- messages: Collection<Snowflake, BushMessage | PartialBushMessage>
+ messages: Collection<Snowflake, BushMessage | PartialBushMessage>,
+ channel: BushTextBasedChannel
];
messageReactionAdd: [
reaction: BushMessageReaction | PartialBushMessageReaction,
@@ -119,14 +120,18 @@ export interface BushClientEvents extends AkairoClientEvents {
roleUpdate: [oldRole: BushRole, newRole: BushRole];
threadCreate: [thread: BushThreadChannel, newlyCreated: boolean];
threadDelete: [thread: BushThreadChannel];
- threadListSync: [threads: Collection<Snowflake, BushThreadChannel>];
+ threadListSync: [
+ threads: Collection<Snowflake, BushThreadChannel>,
+ guild: BushGuild
+ ];
threadMemberUpdate: [
oldMember: BushThreadMember,
newMember: BushThreadMember
];
threadMembersUpdate: [
oldMembers: Collection<Snowflake, BushThreadMember>,
- newMembers: Collection<Snowflake, BushThreadMember>
+ newMembers: Collection<Snowflake, BushThreadMember>,
+ thread: BushThreadChannel
];
threadUpdate: [oldThread: BushThreadChannel, newThread: BushThreadChannel];
typingStart: [typing: Typing];
diff --git a/src/lib/extensions/discord.js/BushDMChannel.ts b/src/lib/extensions/discord.js/BushDMChannel.ts
index dc7d309..87382ec 100644
--- a/src/lib/extensions/discord.js/BushDMChannel.ts
+++ b/src/lib/extensions/discord.js/BushDMChannel.ts
@@ -1,11 +1,9 @@
-/* eslint-disable deprecation/deprecation */
import type {
BushCategoryChannel,
BushClient,
BushMessageManager,
BushNewsChannel,
BushStageChannel,
- BushStoreChannel,
BushTextBasedChannel,
BushTextChannel,
BushThreadChannel,
@@ -36,7 +34,6 @@ export interface BushDMChannel extends DMChannel {
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
- isStore(): this is BushStoreChannel;
isThread(): this is BushThreadChannel;
isStage(): this is BushStageChannel;
isTextBased(): this is BushTextBasedChannel;
diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts
index b0a34e7..8b1b5fa 100644
--- a/src/lib/extensions/discord.js/BushGuild.ts
+++ b/src/lib/extensions/discord.js/BushGuild.ts
@@ -20,7 +20,7 @@ import {
type GuildLogType,
type GuildModel
} from '#lib';
-import { APIMessage } from 'discord-api-types/v9';
+import { APIMessage } from 'discord-api-types/v10';
import {
Collection,
Guild,
diff --git a/src/lib/extensions/discord.js/BushGuildChannel.ts b/src/lib/extensions/discord.js/BushGuildChannel.ts
index dd523e5..62bf05a 100644
--- a/src/lib/extensions/discord.js/BushGuildChannel.ts
+++ b/src/lib/extensions/discord.js/BushGuildChannel.ts
@@ -1,4 +1,3 @@
-/* eslint-disable deprecation/deprecation */
import type {
BushCategoryChannel,
BushClient,
@@ -7,7 +6,6 @@ import type {
BushGuildBasedChannel,
BushNewsChannel,
BushStageChannel,
- BushStoreChannel,
BushTextBasedChannel,
BushTextChannel,
BushThreadChannel,
@@ -42,7 +40,6 @@ export interface BushGuildChannel extends GuildChannel {
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
- isStore(): this is BushStoreChannel;
isThread(): this is BushThreadChannel;
isStage(): this is BushStageChannel;
isTextBased(): this is BushGuildBasedChannel & BushTextBasedChannel;
diff --git a/src/lib/extensions/discord.js/BushGuildChannelManager.ts b/src/lib/extensions/discord.js/BushGuildChannelManager.ts
index 91bff07..4048b98 100644
--- a/src/lib/extensions/discord.js/BushGuildChannelManager.ts
+++ b/src/lib/extensions/discord.js/BushGuildChannelManager.ts
@@ -5,13 +5,11 @@ import type {
BushGuildChannel,
BushMappedGuildChannelTypes,
BushNonThreadGuildBasedChannel,
- BushStoreChannel,
BushTextChannel
} from '#lib';
import {
CachedManager,
ChannelData,
- ChannelType,
ChannelWebhookCreateOptions,
SetChannelPositionOptions,
Webhook,
@@ -67,38 +65,10 @@ export declare class BushGuildChannelManager
* ],
* })
*/
- public create<T extends Exclude<GuildChannelTypes, ChannelType.GuildStore>>(
+ public create<T extends GuildChannelTypes>(
name: string,
options: GuildChannelCreateOptions & { type: T }
): Promise<BushMappedGuildChannelTypes[T]>;
-
- /**
- * Creates a new channel in the guild.
- * @param name The name of the new channel
- * @param options Options for creating the new channel
- * @example
- * // Create a new text channel
- * guild.channels.create('new-general', { reason: 'Needed a cool new channel' })
- * .then(console.log)
- * .catch(console.error);
- * @example
- * // Create a new channel with permission overwrites
- * guild.channels.create('new-voice', {
- * type: 'GuildVoice',
- * permissionOverwrites: [
- * {
- * id: message.author.id,
- * deny: [PermissionFlagsBits.ViewChannel],
- * },
- * ],
- * })
- * @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information
- */
- public create(
- name: string,
- options: GuildChannelCreateOptions & { type: ChannelType.GuildStore }
- ): // eslint-disable-next-line deprecation/deprecation
- Promise<BushStoreChannel>;
public create(name: string, options?: GuildChannelCreateOptions): Promise<BushTextChannel>;
/**
diff --git a/src/lib/extensions/discord.js/BushMessageManager.ts b/src/lib/extensions/discord.js/BushMessageManager.ts
index 80b7a21..edb7982 100644
--- a/src/lib/extensions/discord.js/BushMessageManager.ts
+++ b/src/lib/extensions/discord.js/BushMessageManager.ts
@@ -1,9 +1,9 @@
import { BushMessageResolvable, BushTextBasedChannel, type BushMessage } from '#lib';
import {
CachedManager,
+ FetchMessageOptions,
+ FetchMessagesOptions,
MessageManager,
- type BaseFetchOptions,
- type ChannelLogsQueryOptions,
type Collection,
type EmojiIdentifierResolvable,
type MessageEditOptions,
@@ -72,8 +72,8 @@ export declare class BushMessageManager
* .then(messages => console.log(`${messages.filter(m => m.author.id === '84484653687267328').size} messages`))
* .catch(console.error);
*/
- public fetch(message: Snowflake, options?: BaseFetchOptions): Promise<BushMessage>;
- public fetch(options?: ChannelLogsQueryOptions, cacheOptions?: BaseFetchOptions): Promise<Collection<Snowflake, BushMessage>>;
+ public fetch(options: BushMessageResolvable | FetchMessageOptions): Promise<BushMessage>;
+ public fetch(options?: FetchMessagesOptions): Promise<Collection<Snowflake, BushMessage>>;
/**
* Fetches the pinned messages of this channel and returns a collection of them.
@@ -107,3 +107,7 @@ export declare class BushMessageManager
*/
public unpin(message: BushMessageResolvable): Promise<void>;
}
+
+export interface BushFetchMessageOptions extends FetchMessageOptions {
+ message: BushMessageResolvable;
+}
diff --git a/src/lib/extensions/discord.js/BushModalSubmitInteraction.ts b/src/lib/extensions/discord.js/BushModalSubmitInteraction.ts
index b05c0d7..9bdc9e5 100644
--- a/src/lib/extensions/discord.js/BushModalSubmitInteraction.ts
+++ b/src/lib/extensions/discord.js/BushModalSubmitInteraction.ts
@@ -7,9 +7,10 @@ import type {
BushTextBasedChannel,
BushUser
} from '#lib';
-import type { APIInteractionGuildMember, APIModalSubmitInteraction } from 'discord-api-types/v9';
+import type { APIInteractionGuildMember, APIModalSubmitInteraction } from 'discord-api-types/v10';
import {
InteractionDeferUpdateOptions,
+ InteractionResponse,
InteractionUpdateOptions,
MessagePayload,
ModalSubmitInteraction,
@@ -49,7 +50,7 @@ export interface BushModalMessageModalSubmitInteraction<Cached extends CacheType
/**
* The message associated with this interaction
*/
- message: BushGuildCacheMessage<Cached> | null;
+ message: BushGuildCacheMessage<Cached>;
/**
* Updates the original message of the component on which the interaction was received on.
@@ -64,7 +65,7 @@ export interface BushModalMessageModalSubmitInteraction<Cached extends CacheType
* .catch(console.error);
*/
update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<BushGuildCacheMessage<Cached>>;
- update(options: string | MessagePayload | InteractionUpdateOptions): Promise<void>;
+ update(options: string | MessagePayload | InteractionUpdateOptions): Promise<InteractionResponse>;
/**
* Defers an update to the message to which the component was attached.
@@ -76,7 +77,7 @@ export interface BushModalMessageModalSubmitInteraction<Cached extends CacheType
* .catch(console.error);
*/
deferUpdate(options: InteractionDeferUpdateOptions & { fetchReply: true }): Promise<BushGuildCacheMessage<Cached>>;
- deferUpdate(options?: InteractionDeferUpdateOptions): Promise<void>;
+ deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionResponse>;
/**
* Indicates whether this interaction is received from a guild.
diff --git a/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts b/src/lib/extensions/discord.js/BushSelectMenuInteraction.ts
index 35e6301..66a5ea9 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 'discord-api-types/v9';
+import type { APIInteractionGuildMember } from 'discord-api-types/v10';
import { SelectMenuInteraction, type CacheType, type CacheTypeReducer } from 'discord.js';
import type { RawMessageSelectMenuInteractionData } from 'discord.js/typings/rawDataTypes';
diff --git a/src/lib/extensions/discord.js/BushStoreChannel.ts b/src/lib/extensions/discord.js/BushStoreChannel.ts
deleted file mode 100644
index a2cc114..0000000
--- a/src/lib/extensions/discord.js/BushStoreChannel.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/* eslint-disable deprecation/deprecation */
-import type {
- BushCategoryChannel,
- BushClient,
- BushDMChannel,
- BushGuild,
- BushGuildBasedChannel,
- BushGuildMember,
- BushNewsChannel,
- BushStageChannel,
- BushTextBasedChannel,
- BushTextChannel,
- BushThreadChannel,
- BushVoiceBasedChannel,
- BushVoiceChannel
-} from '#lib';
-import { PartialGroupDMChannel, StoreChannel, type Collection, type Snowflake } from 'discord.js';
-import type { RawGuildChannelData } from 'discord.js/typings/rawDataTypes';
-
-/**
- * Represents a guild store channel on Discord.
- * @deprecated Store channels are deprecated and will be removed from Discord in March 2022. See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/4414590563479) for more information
- */
-export class BushStoreChannel extends StoreChannel {
- public declare guild: BushGuild;
-
- public constructor(guild: BushGuild, data?: RawGuildChannelData, client?: BushClient) {
- super(guild, data, client);
- }
-}
-
-export interface BushStoreChannel extends StoreChannel {
- get members(): Collection<Snowflake, BushGuildMember>;
- get parent(): BushCategoryChannel | null;
- isText(): this is BushTextChannel;
- isDM(): this is BushDMChannel;
- isDMBased(): this is PartialGroupDMChannel | BushDMChannel;
- isVoice(): this is BushVoiceChannel;
- isCategory(): this is BushCategoryChannel;
- isNews(): this is BushNewsChannel;
- isStore(): this is BushStoreChannel;
- isThread(): this is BushThreadChannel;
- isStage(): this is BushStageChannel;
- isTextBased(): this is BushGuildBasedChannel & BushTextBasedChannel;
- isVoiceBased(): this is BushVoiceBasedChannel;
-}
diff --git a/src/lib/extensions/discord.js/BushTextChannel.ts b/src/lib/extensions/discord.js/BushTextChannel.ts
index ad54b76..575de20 100644
--- a/src/lib/extensions/discord.js/BushTextChannel.ts
+++ b/src/lib/extensions/discord.js/BushTextChannel.ts
@@ -1,4 +1,3 @@
-/* eslint-disable deprecation/deprecation */
import type {
BushCategoryChannel,
BushDMChannel,
@@ -7,7 +6,6 @@ import type {
BushMessageManager,
BushNewsChannel,
BushStageChannel,
- BushStoreChannel,
BushTextBasedChannel,
BushThreadChannel,
BushThreadManager,
@@ -37,7 +35,6 @@ export interface BushTextChannel extends TextChannel {
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
- isStore(): this is BushStoreChannel;
isThread(): this is BushThreadChannel;
isStage(): this is BushStageChannel;
isTextBased(): this is BushGuildBasedChannel & BushTextBasedChannel;
diff --git a/src/lib/extensions/discord.js/BushThreadChannel.ts b/src/lib/extensions/discord.js/BushThreadChannel.ts
index 5663ba4..8b941f9 100644
--- a/src/lib/extensions/discord.js/BushThreadChannel.ts
+++ b/src/lib/extensions/discord.js/BushThreadChannel.ts
@@ -1,4 +1,3 @@
-/* eslint-disable deprecation/deprecation */
import type {
BushCategoryChannel,
BushClient,
@@ -9,7 +8,6 @@ import type {
BushMessageManager,
BushNewsChannel,
BushStageChannel,
- BushStoreChannel,
BushTextBasedChannel,
BushTextChannel,
BushThreadMemberManager,
@@ -42,7 +40,6 @@ export interface BushThreadChannel extends ThreadChannel {
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
- isStore(): this is BushStoreChannel;
isThread(): this is BushThreadChannel;
isStage(): this is BushStageChannel;
isTextBased(): this is BushGuildBasedChannel & BushTextBasedChannel;
diff --git a/src/lib/extensions/discord.js/BushVoiceChannel.ts b/src/lib/extensions/discord.js/BushVoiceChannel.ts
index 6691045..6966727 100644
--- a/src/lib/extensions/discord.js/BushVoiceChannel.ts
+++ b/src/lib/extensions/discord.js/BushVoiceChannel.ts
@@ -1,4 +1,3 @@
-/* eslint-disable deprecation/deprecation */
import type {
BushCategoryChannel,
BushClient,
@@ -8,7 +7,6 @@ import type {
BushGuildMember,
BushNewsChannel,
BushStageChannel,
- BushStoreChannel,
BushTextBasedChannel,
BushTextChannel,
BushThreadChannel,
@@ -35,7 +33,6 @@ export interface BushVoiceChannel extends VoiceChannel {
isVoice(): this is BushVoiceChannel;
isCategory(): this is BushCategoryChannel;
isNews(): this is BushNewsChannel;
- isStore(): this is BushStoreChannel;
isThread(): this is BushThreadChannel;
isStage(): this is BushStageChannel;
isTextBased(): this is BushGuildBasedChannel & BushTextBasedChannel;
diff --git a/src/lib/extensions/discord.js/other.ts b/src/lib/extensions/discord.js/other.ts
index d7fb15b..086ace0 100644
--- a/src/lib/extensions/discord.js/other.ts
+++ b/src/lib/extensions/discord.js/other.ts
@@ -1,4 +1,3 @@
-/* eslint-disable deprecation/deprecation */
import type {
BushApplicationCommand,
BushCategoryChannel,
@@ -11,7 +10,6 @@ import type {
BushReactionEmoji,
BushRole,
BushStageChannel,
- BushStoreChannel,
BushTextChannel,
BushThreadChannel,
BushThreadMember,
@@ -19,7 +17,7 @@ import type {
BushVoiceChannel,
PartialBushDMChannel
} from '#lib';
-import { APIMessage } from 'discord-api-types/v9';
+import { APIMessage } from 'discord-api-types/v10';
import type {
ApplicationCommandResolvable,
CacheType,
@@ -109,7 +107,6 @@ export type BushAnyChannel =
| PartialBushDMChannel
| BushNewsChannel
| BushStageChannel
- | BushStoreChannel
| BushTextChannel
| BushThreadChannel
| BushVoiceChannel;
@@ -146,8 +143,8 @@ export interface BushMappedChannelCategoryTypes {
[ChannelType.GuildNews]: BushNewsChannel;
[ChannelType.GuildVoice]: BushVoiceChannel;
[ChannelType.GuildText]: BushTextChannel;
- [ChannelType.GuildStore]: BushStoreChannel;
[ChannelType.GuildStageVoice]: BushStageChannel;
+ [ChannelType.GuildForum]: never; // TODO: Fix when guild forums come out
}
export type BushMappedGuildChannelTypes = {
diff --git a/src/lib/index.ts b/src/lib/index.ts
index eb7cf76..59d8b53 100644
--- a/src/lib/index.ts
+++ b/src/lib/index.ts
@@ -57,7 +57,6 @@ export * from './extensions/discord.js/BushRole.js';
export * from './extensions/discord.js/BushSelectMenuInteraction.js';
export * from './extensions/discord.js/BushStageChannel.js';
export * from './extensions/discord.js/BushStageInstance.js';
-export * from './extensions/discord.js/BushStoreChannel.js';
export * from './extensions/discord.js/BushTextChannel.js';
export * from './extensions/discord.js/BushThreadChannel.js';
export type { BushThreadManager } from './extensions/discord.js/BushThreadManager.js';
diff --git a/src/lib/utils/BushConstants.ts b/src/lib/utils/BushConstants.ts
index df69806..9befc5a 100644
--- a/src/lib/utils/BushConstants.ts
+++ b/src/lib/utils/BushConstants.ts
@@ -1,4 +1,4 @@
-import { Colors } from 'discord.js';
+import { Colors, GuildFeature } from 'discord.js';
import { BushClientUtil } from '../extensions/discord-akairo/BushClientUtil.js';
const rawCapeUrl = 'https://raw.githubusercontent.com/NotEnoughUpdates/capes/master/';
@@ -243,38 +243,43 @@ export class BushConstants {
UseExternalStickers: { name: 'Use External Stickers', important: false },
SendMessagesInThreads: { name: 'Send Messages In Threads', important: false },
StartEmbeddedActivities: { name: 'Start Activities', important: false },
- ModerateMembers: { name: 'Timeout Members', important: true }
+ ModerateMembers: { name: 'Timeout Members', important: true },
+ UseEmbeddedActivities: { name: 'Use Activities', important: false }
},
// prettier-ignore
features: {
- VERIFIED: { name: 'Verified', important: true, emoji: '<:verified:850795049817473066>', weight: 0 },
- PARTNERED: { name: 'Partnered', important: true, emoji: '<:partneredServer:850794851955507240>', weight: 1 },
- MORE_STICKERS: { name: 'More Stickers', important: true, emoji: null, weight: 2 },
- MORE_EMOJI: { name: 'More Emoji', important: true, emoji: '<:moreEmoji:850786853497602080>', weight: 3 },
- FEATURABLE: { name: 'Featurable', important: true, emoji: '<:featurable:850786776372084756>', weight: 4 },
- RELAY_ENABLED: { name: 'Relay Enabled', important: true, emoji: '<:relayEnabled:850790531441229834>', weight: 5 },
- DISCOVERABLE: { name: 'Discoverable', important: true, emoji: '<:discoverable:850786735360966656>', weight: 6 },
+ [GuildFeature.Verified]: { name: 'Verified', important: true, emoji: '<:verified:850795049817473066>', weight: 0 },
+ [GuildFeature.Partnered]: { name: 'Partnered', important: true, emoji: '<:partneredServer:850794851955507240>', weight: 1 },
+ [GuildFeature.MoreStickers]: { name: 'More Stickers', important: true, emoji: null, weight: 2 },
+ 'MORE_EMOJIS': { name: 'More Emoji', important: true, emoji: '<:moreEmoji:850786853497602080>', weight: 3 },
+ [GuildFeature.Featurable]: { name: 'Featurable', important: true, emoji: '<:featurable:850786776372084756>', weight: 4 },
+ [GuildFeature.RelayEnabled]: { name: 'Relay Enabled', important: true, emoji: '<:relayEnabled:850790531441229834>', weight: 5 },
+ [GuildFeature.Discoverable]: { name: 'Discoverable', important: true, emoji: '<:discoverable:850786735360966656>', weight: 6 },
ENABLED_DISCOVERABLE_BEFORE: { name: 'Enabled Discovery Before', important: false, emoji: '<:enabledDiscoverableBefore:850786754670624828>', weight: 7 },
- MONETIZATION_ENABLED: { name: 'Monetization Enabled', important: true, emoji: null, weight: 8 },
- TICKETED_EVENTS_ENABLED: { name: 'Ticketed Events Enabled', important: true, emoji: null, weight: 9 },
- PREVIEW_ENABLED: { name: 'Preview Enabled', important: true, emoji: '<:previewEnabled:850790508266913823>', weight: 10 },
- COMMERCE: { name: 'Store Channels', important: true, emoji: '<:storeChannels:850786692432396338>', weight: 11 },
- VANITY_URL: { name: 'Vanity URL', important: false, emoji: '<:vanityURL:850790553079644160>', weight: 12 },
- VIP_REGIONS: { name: 'VIP Regions', important: false, emoji: '<:VIPRegions:850794697496854538>', weight: 13 },
- ANIMATED_ICON: { name: 'Animated Icon', important: false, emoji: '<:animatedIcon:850774498071412746>', weight: 14 },
- BANNER: { name: 'Banner', important: false, emoji: '<:banner:850786673150787614>', weight: 15 },
- INVITE_SPLASH: { name: 'Invite Splash', important: false, emoji: '<:inviteSplash:850786798246559754>', weight: 16 },
- PRIVATE_THREADS: { name: 'Private Threads', important: false, emoji: '<:privateThreads:869763711894700093>', weight: 17 },
- THREE_DAY_THREAD_ARCHIVE: { name: 'Three Day Thread Archive', important: false, emoji: '<:threeDayThreadArchive:869767841652564008>', weight: 19 },
- SEVEN_DAY_THREAD_ARCHIVE: { name: 'Seven Day Thread Archive', important: false, emoji: '<:sevenDayThreadArchive:869767896123998288>', weight: 20 },
- ROLE_ICONS: { name: 'Role Icons', important: false, emoji: '<:roleIcons:876993381929222175>', weight: 21 },
- NEWS: { name: 'Announcement Channels', important: false, emoji: '<:announcementChannels:850790491796013067>', weight: 22 },
- MEMBER_VERIFICATION_GATE_ENABLED: { name: 'Membership Verification Gate', important: false, emoji: '<:memberVerificationGateEnabled:850786829984858212>', weight: 23 },
- WELCOME_SCREEN_ENABLED: { name: 'Welcome Screen Enabled', important: false, emoji: '<:welcomeScreenEnabled:850790575875817504>', weight: 24 },
- COMMUNITY: { name: 'Community', important: false, emoji: '<:community:850786714271875094>', weight: 25 },
+ [GuildFeature.MonetizationEnabled]: { name: 'Monetization Enabled', important: true, emoji: null, weight: 8 },
+ [GuildFeature.TicketedEventsEnabled]: { name: 'Ticketed Events Enabled', important: true, emoji: null, weight: 9 },
+ [GuildFeature.PreviewEnabled]: { name: 'Preview Enabled', important: true, emoji: '<:previewEnabled:850790508266913823>', weight: 10 },
+ [GuildFeature.Commerce]: { name: 'Store Channels', important: true, emoji: '<:storeChannels:850786692432396338>', weight: 11 },
+ [GuildFeature.VanityURL]: { name: 'Vanity URL', important: false, emoji: '<:vanityURL:850790553079644160>', weight: 12 },
+ [GuildFeature.VIPRegions]: { name: 'VIP Regions', important: false, emoji: '<:VIPRegions:850794697496854538>', weight: 13 },
+ [GuildFeature.AnimatedIcon]: { name: 'Animated Icon', important: false, emoji: '<:animatedIcon:850774498071412746>', weight: 14 },
+ [GuildFeature.Banner]: { name: 'Banner', important: false, emoji: '<:banner:850786673150787614>', weight: 15 },
+ [GuildFeature.InviteSplash]: { name: 'Invite Splash', important: false, emoji: '<:inviteSplash:850786798246559754>', weight: 16 },
+ [GuildFeature.PrivateThreads]: { name: 'Private Threads', important: false, emoji: '<:privateThreads:869763711894700093>', weight: 17 },
+ [GuildFeature.ThreeDayThreadArchive]: { name: 'Three Day Thread Archive', important: false, emoji: '<:threeDayThreadArchive:869767841652564008>', weight: 19 },
+ [GuildFeature.SevenDayThreadArchive]: { name: 'Seven Day Thread Archive', important: false, emoji: '<:sevenDayThreadArchive:869767896123998288>', weight: 20 },
+ [GuildFeature.RoleIcons]: { name: 'Role Icons', important: false, emoji: '<:roleIcons:876993381929222175>', weight: 21 },
+ [GuildFeature.News]: { name: 'Announcement Channels', important: false, emoji: '<:announcementChannels:850790491796013067>', weight: 22 },
+ [GuildFeature.MemberVerificationGateEnabled]: { name: 'Membership Verification Gate', important: false, emoji: '<:memberVerificationGateEnabled:850786829984858212>', weight: 23 },
+ [GuildFeature.WelcomeScreenEnabled]: { name: 'Welcome Screen Enabled', important: false, emoji: '<:welcomeScreenEnabled:850790575875817504>', weight: 24 },
+ [GuildFeature.Community]: { name: 'Community', important: false, emoji: '<:community:850786714271875094>', weight: 25 },
THREADS_ENABLED: {name: 'Threads Enabled', important: false, emoji: '<:threadsEnabled:869756035345317919>', weight: 26 },
THREADS_ENABLED_TESTING: {name: 'Threads Enabled Testing', important: false, emoji: null, weight: 27 },
+ [GuildFeature.AnimatedBanner]: { name: 'Animated Banner', important: false, emoji: null, weight: 28 },
+ [GuildFeature.HasDirectoryEntry]: { name: 'Has Directory Entry', important: false, emoji: null, weight: 29 },
+ [GuildFeature.Hub]: { name: 'Hub', important: false, emoji: null, weight: 30 },
+ [GuildFeature.LinkedToHub]: { name: 'Linked To Hub', important: false, emoji: null, weight: 31 },
},
regions: {
@@ -318,7 +323,7 @@ export class BushConstants {
ChannelNews: '<:announcements:853375553531674644>',
ChannelVoice: '<:voice:853375566735212584>',
ChannelStage: '<:stage:853375583521210468>',
- ChannelStore: '<:store:853375601175691266>',
+ // ChannelStore: '<:store:853375601175691266>',
ChannelCategory: '<:category:853375615260819476>',
ChannelThread: '<:thread:865033845753249813>'
},
diff --git a/src/lib/utils/BushLogger.ts b/src/lib/utils/BushLogger.ts
index 5effb52..91c23d3 100644
--- a/src/lib/utils/BushLogger.ts
+++ b/src/lib/utils/BushLogger.ts
@@ -1,6 +1,6 @@
import chalk from 'chalk';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import { Embed, Util, type Message, type PartialTextBasedChannelFields } from 'discord.js';
+import { EmbedBuilder, Util, type Message, type PartialTextBasedChannelFields } from 'discord.js';
import repl, { REPLServer, REPL_MODE_STRICT } from 'repl';
import { WriteStream } from 'tty';
import { inspect } from 'util';
@@ -206,7 +206,7 @@ export class BushLogger {
`${chalk.bgGrey(this.#getTimeStamp())} ${chalk.grey(`[${header}]`)} ${this.#parseFormatting(newContent, 'blackBright')}`
);
if (!sendChannel) return;
- const embed = new Embed()
+ const embed = new EmbedBuilder()
.setDescription(`**[${header}]** ${this.#parseFormatting(this.#stripColor(newContent), '', true)}`)
.setColor(util.colors.gray)
.setTimestamp();
@@ -251,7 +251,7 @@ export class BushLogger {
`${chalk.bgCyan(this.#getTimeStamp())} ${chalk.cyan(`[${header}]`)} ${this.#parseFormatting(newContent, 'blueBright')}`
);
if (!sendChannel) return;
- const embed = new Embed()
+ const embed = new EmbedBuilder()
.setDescription(`**[${header}]** ${this.#parseFormatting(this.#stripColor(newContent), '', true)}`)
.setColor(util.colors.info)
.setTimestamp();
@@ -275,7 +275,7 @@ export class BushLogger {
);
if (!sendChannel) return;
- const embed = new Embed()
+ const embed = new EmbedBuilder()
.setDescription(`**[${header}]** ${this.#parseFormatting(this.#stripColor(newContent), '', true)}`)
.setColor(util.colors.warn)
.setTimestamp();
@@ -298,7 +298,7 @@ export class BushLogger {
)}`
);
if (!sendChannel) return;
- const embed = new Embed()
+ const embed = new EmbedBuilder()
.setDescription(`**[${header}]** ${this.#parseFormatting(this.#stripColor(newContent), '', true)}`)
.setColor(util.colors.error)
.setTimestamp();
@@ -322,7 +322,7 @@ export class BushLogger {
)}`
);
if (!sendChannel) return;
- const embed = new Embed()
+ const embed = new EmbedBuilder()
.setDescription(`**[${header}]** ${this.#parseFormatting(this.#stripColor(newContent), '', true)}`)
.setColor(util.colors.success)
.setTimestamp();