diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-29 21:16:30 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-29 21:16:30 -0400 |
commit | 1c6d451ffd63f9805b978e8565807e8a6b528681 (patch) | |
tree | 97ae6b3746b42ed21eb0fc3a3888bbfca36a1806 /src/lib | |
parent | 7990abdb511eeec2a114b124a3628b10bfefc342 (diff) | |
download | tanzanite-1c6d451ffd63f9805b978e8565807e8a6b528681.tar.gz tanzanite-1c6d451ffd63f9805b978e8565807e8a6b528681.tar.bz2 tanzanite-1c6d451ffd63f9805b978e8565807e8a6b528681.zip |
added a rudimentary automod, fixed a bunch of stuff, added some more listeners
Diffstat (limited to 'src/lib')
25 files changed, 696 insertions, 184 deletions
diff --git a/src/lib/badlinks.json b/src/lib/badlinks.json new file mode 100644 index 0000000..f010bc3 --- /dev/null +++ b/src/lib/badlinks.json @@ -0,0 +1,289 @@ +[ + "streammcomunnity.ru", + "stceamcomminity.com", + "steamcommnuninty.com", + "steamcommnunily.com", + "steamncommuniity.com", + "steamcommuniiy.ru", + "steamcomnumity.ru", + "steamoemmunity.com", + "streancommunuty.ru", + "streamcommuninnity.com", + "streamcomnumity.ru", + "stemcommunnilty.com", + "steamsupportpowered.icu", + "staemcomrnunity.store", + "steam-trades.icu", + "facecup.fun", + "fatown.net", + "ultracup.fun", + "iemcup.com", + "esea-mdl.com", + "uspringcup.com", + "denforapasi.cf", + "streamcommulinty.com", + "csskill.com", + "csgo-gifts.com", + "eplcups.com", + "tf2market.store", + "gamerich.xyz", + "anomalygiveaways.pro", + "casefire.fun", + "fineleague.fun", + "stearmcommunnitty.online", + "stearncomminuty.ru", + "stiemcommunitty.ru", + "strearmcommunity.ru", + "steancomunnity.ru", + "cloud9team.space", + "streancommunuty.ru", + "strearmcomunity.ru", + "stermccommunitty.ru", + "steamcommunytu.ru", + "streamcomunity.com", + "steamncommunity.com", + "steamcommunily.uno", + "acercup.com", + "xgamercup.com", + "lootxmarket.com", + "roll4tune.com", + "fivetown.net", + "giveavvay.com", + "stermcommuniity.com", + "skinxinfo.net", + "bit-skins.ru", + "aladdinhub.fun", + "allskinz.xyz", + "ano-skinspin.xyz", + "anomalyknifes.xyz", + "anomalyskin.xyz", + "anomalyskinz.xyz", + "anoskinzz.xyz", + "berrygamble.com", + "bitknife.xyz", + "bitskines.ru", + "challengeme.vip", + "challengeme.in", + "challengme.ru", + "cmepure.com", + "cmskillcup.com", + "counterpaid.xyz", + "counterspin.top", + "counterstrikegift.xyz", + "cs-beast.xyz", + "cs-lucky.xyz", + "cs-pill.xyz", + "cs-prizeskins.xyz", + "cs-prizeskinz.xyz", + "cs-simpleroll.xyz", + "cs-skinz.xyz", + "cs-smoke.xyz", + "cs-spinz.xyz", + "cs-victory.xyz", + "csallskin.xyz", + "csbuyskins.in", + "cscoat.eu", + "csgo-analyst.com", + "csgo-cash.eu", + "csgo-steamanalyst.net", + "csgo-swapskin.com", + "csgo-trade.net", + "csgo-up.com", + "csgobeats.com", + "csgocase.one", + "csgocashs.com", + "csgocheck.ru", + "csgocompetive.com", + "csgodetails.info", + "csgodreamer.com", + "csgodrs.com", + "csgoelite.xyz", + "csgoencup.com", + "csgoevent.xyz", + "csgoindex.ru", + "csgoitemdetails.com", + "csgoitemsprices.com", + "csgoko.tk", + "csgomarble.xyz", + "csgomarketplace.net", + "csgomarkets.net", + "csgoprocupgo.com", + "csgorcup.com", + "csgorose.com", + "csgoroyalskins1.com", + "csgoskill.ru", + "csgoskinprices.com", + "csgoskinsinfo.com", + "csgoskinsroll.com", + "csgosteamanalysis.com", + "csgosteamanalyst.ru", + "csgoteammate.gq", + "csgothunby.com", + "csgotrades.net", + "csgovip.ru", + "csgoxgiveaway.ru", + "csgozone.net.in", + "csgunskins.xyz", + "csmoneyskinz.xyz", + "csmvcecup.com", + "csprices.in", + "csskillpro.xyz", + "csskinz.xyz", + "cstournament.ru", + "csxrnoney.com", + "cybergamearena.ru", + "d2cups.com", + "d2faceit.com", + "deamonbets.ru", + "demonbets.ru", + "diablobets.com", + "doatgiveaway.top", + "dopeskins.com", + "dota2fight.ru", + "dota2fight.net", + "dota2giveaway.top", + "dota2giveaways.top", + "dotafights.vip", + "dotagiveaway.win", + "earnskinz.xyz", + "emeraldbets.ru", + "esportgaming.ru", + "event-games4roll.com", + "exchangeuritems.gq", + "extraskinscs.xyz", + "ezwin24.ru", + "faceiteasyleague.ru", + "fireopencase.com", + "free-skins.ru", + "game4roll.com", + "gameluck.ru", + "games-roll.ru", + "games-roll.ml", + "games-roll.ga", + "giveawayskin.com", + "global-skins.gq", + "globalcsskins.xyz", + "globalskins.tk", + "goldendota.com", + "goodskins.gq", + "gosteamanalyst.com", + "gtakey.ru", + "hellgiveaway.trade", + "hltvcsgo.com", + "hltvgames.net", + "knifespin.top", + "knifespin.xyz", + "knifespin.top", + "knifespins.xyz", + "knifez-roll.xyz", + "knifez-win.xyz", + "league-csgo.com", + "lehatop-01.ru", + "loungeztrade.com", + "lucky-skins.xyz", + "makson-gta.ru", + "maxskins.xyz", + "mvcsgo.com", + "mvpcup.ru", + "mvptournament.com", + "mygames4roll.com", + "night-skins.com", + "ownerbets.com", + "playerskinz.xyz", + "rangskins.com", + "roll-skins.ru", + "roll4knife.xyz", + "rollknfez.xyz", + "rollskin-simple.xyz", + "csgo-market.ru.com", + "sakuralive.ru.com", + "csgocupp.ru.com", + "csgoeasywin.ru.com", + "csgocybersport.ru.com", + "csgocheck.ru.com", + "csgo-market.ru.com", + "csgoindex.ru.com", + "rushbskins.xyz", + "rushskins.xyz", + "s1mple-spin.xyz", + "simple-knifez.xyz", + "simple-win.xyz", + "simplegamepro.ru", + "simpleroll-cs.xyz", + "simplespinz.xyz", + "simplewinz.xyz", + "skin-index.com", + "skin888trade.com", + "skincs-spin.xyz", + "skincs-spin.top", + "skinmarkets.net", + "skins-hub.top", + "skins-info.net", + "skins-jungle.xyz", + "skinsboost.ru", + "skinsdatabse.com", + "skinsind.com", + "skinsmind.ru", + "skinspace.ru", + "skinsplane.com", + "skinsplanes.com", + "skinsplanets.com", + "skinxmarket.site", + "skinz-spin.top", + "skinz-spin.xyz", + "skinzjar.ru", + "skinzprize.xyz", + "skinzspin-cs.xyz", + "skinzspinz.xyz", + "spin-games.com", + "spin4skinzcs.top", + "spin4skinzcs.xyz", + "spinforskin.ml", + "sponsored-simple.xyz", + "staffstatsgo.com", + "starrygamble.com", + "stat-csgo.ru", + "stats-cs.ru", + "steam-analyst.ru", + "steamanalysts.com", + "steamgamesroll.ru", + "stewie2k-giveaway-150days.pro", + "sunnygamble.com", + "swapskins.live", + "test-domuin2.com", + "test-domuin3.ru", + "test-domuin4.ru", + "test-domuin5.ru", + "tournamentt.com", + "waterbets.ru", + "ultimateskins.xyz", + "win-skin.top", + "win-skin.xyz", + "winknifespin.xyz", + "winskin-simple.xyz", + "winskins.top", + "wintheskin.xyz", + "steemcommnunity.ru", + "steamcomminytu.ru", + "stearncommunity.ru", + "stearncommunytiy.ru", + "steamcommutiny.com", + "steamcomrunity.com", + "steamcommunytiu.ru", + "steamcommnuntiy.com", + "steamcomminytiu.ru", + "steamcomminytiu.com", + "steancomunyiti.ru", + "steamcormmuntiy.com", + "store-stempowered.com", + "dlscord.store", + "streamcommuunnity.com", + "steamcommunityw.com", + "steamconmunlty.com", + "steamcommrutiny.ru", + "dlscord.info", + "steamcomnmuituy.com", + "steamcommunityu.com", + "dicsord.gifts", + "discod.gift" +] diff --git a/src/lib/badwords.json b/src/lib/badwords.json new file mode 100644 index 0000000..94c854f --- /dev/null +++ b/src/lib/badwords.json @@ -0,0 +1,15 @@ +{ + "nigger": 3, + "nigga": 3, + "retard": 2, + "retarted": 2, + "faggot": 2, + "slut": 1, + "whore": 1, + "卍": 3, + "found a cool software that improves the": 3, + "hi, bro h am leaving cs:go and giving away my skin": 3, + "hi friend, today i am leaving this fucking game": 3, + "hi guys, i'm leaving this fucking game, take my": 3, + "you can choose any skin for yourself": 3 +} diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 10db18d..54b5250 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -1,6 +1,7 @@ import chalk from 'chalk'; import { AkairoClient } from 'discord-akairo'; import { + Collection, Guild, Intents, InteractionReplyOptions, @@ -31,6 +32,7 @@ import { BushCache } from '../../utils/BushCache'; import { BushConstants } from '../../utils/BushConstants'; import { BushLogger } from '../../utils/BushLogger'; import { Config } from '../../utils/Config'; +import { BushApplicationCommand } from '../discord.js/BushApplicationCommand'; import { BushButtonInteraction } from '../discord.js/BushButtonInteraction'; import { BushCategoryChannel } from '../discord.js/BushCategoryChannel'; import { BushCommandInteraction } from '../discord.js/BushCommandInteraction'; @@ -42,6 +44,7 @@ import { BushMessage } from '../discord.js/BushMessage'; import { BushMessageReaction } from '../discord.js/BushMessageReaction'; import { BushNewsChannel } from '../discord.js/BushNewsChannel'; import { BushPresence } from '../discord.js/BushPresence'; +import { BushReactionEmoji } from '../discord.js/BushReactionEmoji'; import { BushRole } from '../discord.js/BushRole'; import { BushSelectMenuInteraction } from '../discord.js/BushSelectMenuInteraction'; import { BushStoreChannel } from '../discord.js/BushStoreChannel'; @@ -66,6 +69,15 @@ export type BushThreadMemberResolvable = BushThreadMember | BushUserResolvable; export type BushUserResolvable = BushUser | Snowflake | BushMessage | BushGuildMember | BushThreadMember; export type BushGuildMemberResolvable = BushGuildMember | BushUserResolvable; export type BushRoleResolvable = BushRole | Snowflake; +export type BushMessageResolvable = BushMessage | Snowflake; +export type BushEmojiResolvable = Snowflake | BushGuildEmoji | BushReactionEmoji; +export type BushEmojiIdentifierResolvable = string | BushEmojiResolvable; +export type BushThreadChannelResolvable = BushThreadChannel | Snowflake; +export type BushApplicationCommandResolvable = BushApplicationCommand | Snowflake; +export interface BushFetchedThreads { + threads: Collection<Snowflake, BushThreadChannel>; + hasMore?: boolean; +} const rl = readline.createInterface({ input: process.stdin, diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index ebac9eb..926a529 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -38,7 +38,10 @@ import { } from 'discord.js'; import got from 'got'; import humanizeDuration from 'humanize-duration'; +import moment from 'moment'; import { inspect, InspectOptions, promisify } from 'util'; +import _badLinks from '../../badlinks.json'; // Stolen from https://github.com/nacrt/SkyblockClient-REPO/blob/main/files/scamlinks.json +import badWords from '../../badwords.json'; import { ActivePunishment, ActivePunishmentType } from '../../models/ActivePunishment'; import { BushNewsChannel } from '../discord.js/BushNewsChannel'; import { BushTextChannel } from '../discord.js/BushTextChannel'; @@ -752,8 +755,13 @@ export class BushClientUtil extends ClientUtil { return typeMap[type]; } - public humanizeDuration(duration: number): string { - return humanizeDuration(duration, { language: 'en', maxDecimalPoints: 2 }); + public humanizeDuration(duration: number, largest?: number): string { + if (largest) return humanizeDuration(duration, { language: 'en', maxDecimalPoints: 2, largest }); + else return humanizeDuration(duration, { language: 'en', maxDecimalPoints: 2 }); + } + + public dateDelta(date: Date, largest?: number) { + return this.humanizeDuration(moment(date).diff(moment()), largest ?? 3); } public async findUUID(player: string): Promise<string> { @@ -790,8 +798,78 @@ export class BushClientUtil extends ClientUtil { /* eslint-enable @typescript-eslint/no-unused-vars */ public async automod(message: BushMessage) { - const autoModPhases = await message.guild.getSetting('autoModPhases'); - if (autoModPhases.includes(message.content.toString()) && message.deletable) return await message.delete(); + if (message.guild.id !== client.consts.mappings.guilds.bush) return; // just temporary + /* await message.guild.getSetting('autoModPhases'); */ + const badLinks = _badLinks.map((link) => { + return { [link]: 3 }; + }); + + const wordArray = [...Object.keys(badWords), ...Object.keys(badLinks)]; + const offences: { [key: string]: number } = {}; + wordArray.forEach((word) => { + if (message.content?.toLowerCase().replace(/ /g, '').includes(word.toLowerCase().replace(/ /g, ''))) { + if (offences[word]) offences[word] = wordArray[word]; + } + }); + if (!Object.keys(offences)?.length) return; + + const highestOffence = Object.values(offences).sort((a, b) => b - a)[0]; + + switch (highestOffence) { + case 0: { + if (message.deletable) void message.delete(); + break; + } + case 1: { + if (message.deletable) void message.delete(); + void message.member.warn({ + moderator: message.guild.me, + reason: 'Saying a blacklisted word.' + }); + break; + } + case 2: { + if (message.deletable) void message.delete(); + void message.member.mute({ + moderator: message.guild.me, + reason: 'Saying a blacklisted word.', + duration: 900_000 // 15 minutes + }); + break; + } + case 3: { + if (message.deletable) void message.delete(); + void message.member.mute({ + moderator: message.guild.me, + reason: 'Saying a blacklisted word.', + duration: 0 // perm + }); + break; + } + } + + const color = + highestOffence === 0 + ? util.colors.lightGray + : highestOffence === 1 + ? util.colors.yellow + : highestOffence === 2 + ? util.colors.orange + : util.colors.red; + void (message.guild.channels.cache.get('783088333055066212') as TextChannel).send({ + embeds: [ + new MessageEmbed() + .setTitle(`[Severity ${highestOffence}] Automod Action Performed`) + .setDescription( + `**User:** ${message.author} (${message.author.tag})\n**Blacklisted Words:** ${util + .surroundArray(Object.keys(offences), '`') + .join()}` + ) + .addField('Message Content', `${this.codeblock(message.content, 1024)}`) + .setColor(color) + .setTimestamp() + ] + }); } public capitalizeFirstLetter(string: string): string { diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index 0127a59..3f79aeb 100644 --- a/src/lib/extensions/discord-akairo/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -78,7 +78,7 @@ export interface BushArgumentOptions extends BaseBushArgumentOptions { type?: BushArgumentType; } export interface CustomBushArgumentOptions extends BaseBushArgumentOptions { - type?: ArgumentTypeCaster | (string | string[])[] | RegExp | string; + customType?: ArgumentTypeCaster | (string | string[])[] | RegExp | string; } export interface BushCommandOptions extends CommandOptions { @@ -122,6 +122,11 @@ export class BushCommand extends Command { this.restrictedChannels = options.restrictedChannels; this.restrictedGuilds = options.restrictedGuilds; this.completelyHide = options.completelyHide; + if (options.args && typeof options.args !== 'function') { + options.args.forEach((arg: BushArgumentOptions | CustomBushArgumentOptions) => { + if (arg['customType']) arg.type = arg['customType']; + }); + } } public exec(message: BushMessage, args: any): any; diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts new file mode 100644 index 0000000..0e071ff --- /dev/null +++ b/src/lib/extensions/discord.js/BushApplicationCommandManager.d.ts @@ -0,0 +1,43 @@ +import { ApplicationCommandData, CachedManager, Collection, FetchApplicationCommandOptions, Snowflake } from 'discord.js'; +import { BushApplicationCommandResolvable, BushClient } from '../discord-akairo/BushClient'; +import { BushApplicationCommand } from './BushApplicationCommand'; +import { BushApplicationCommandPermissionsManager } from './BushApplicationCommandPermissionsManager'; +import { BushGuildResolvable } from './BushCommandInteraction'; + +export class BushApplicationCommandManager< + ApplicationCommandType = BushApplicationCommand<{ guild: BushGuildResolvable }>, + PermissionsOptionsExtras = { guild: BushGuildResolvable }, + PermissionsGuildType = null +> extends CachedManager<Snowflake, ApplicationCommandType, BushApplicationCommandResolvable> { + public constructor(client: BushClient, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public permissions: BushApplicationCommandPermissionsManager< + { command?: BushApplicationCommandResolvable } & PermissionsOptionsExtras, + { command: BushApplicationCommandResolvable } & PermissionsOptionsExtras, + PermissionsOptionsExtras, + PermissionsGuildType, + null + >; + private commandPath({ id, guildId }: { id?: Snowflake; guildId?: Snowflake }): unknown; + public create(command: ApplicationCommandData): Promise<ApplicationCommandType>; + public create(command: ApplicationCommandData, guildId: Snowflake): Promise<BushApplicationCommand>; + public delete(command: BushApplicationCommandResolvable, guildId?: Snowflake): Promise<ApplicationCommandType | null>; + public edit(command: BushApplicationCommandResolvable, data: ApplicationCommandData): Promise<ApplicationCommandType>; + public edit( + command: BushApplicationCommandResolvable, + data: ApplicationCommandData, + guildId: Snowflake + ): Promise<BushApplicationCommand>; + public fetch( + id: Snowflake, + options: FetchApplicationCommandOptions & { guildId: Snowflake } + ): Promise<BushApplicationCommand>; + public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandType>; + public fetch( + id?: Snowflake, + options?: FetchApplicationCommandOptions + ): Promise<Collection<Snowflake, ApplicationCommandType>>; + public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, ApplicationCommandType>>; + public set(commands: ApplicationCommandData[], guildId: Snowflake): Promise<Collection<Snowflake, BushApplicationCommand>>; + private static transformCommand(command: ApplicationCommandData): unknown; +} diff --git a/src/lib/extensions/discord.js/BushApplicationCommandManager.ts b/src/lib/extensions/discord.js/BushApplicationCommandManager.ts deleted file mode 100644 index a8abb6f..0000000 --- a/src/lib/extensions/discord.js/BushApplicationCommandManager.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { ApplicationCommandManager, GuildResolvable, Snowflake } from 'discord.js'; -import { BushClient } from '../discord-akairo/BushClient'; -import { BushApplicationCommand } from './BushApplicationCommand'; -import { BushApplicationCommandPermissionsManager } from './BushApplicationCommandPermissionsManager'; -import { BushGuildResolvable } from './BushCommandInteraction'; - -export type BushApplicationCommandResolvable = BushApplicationCommand | Snowflake; - -export class BushApplicationCommandManager< - ApplicationCommandType = BushApplicationCommand<{ guild: BushGuildResolvable }>, - PermissionsOptionsExtras = { guild: GuildResolvable }, - PermissionsGuildType = null -> extends ApplicationCommandManager<ApplicationCommandType, PermissionsOptionsExtras, PermissionsGuildType> { - public declare permissions: BushApplicationCommandPermissionsManager< - { command?: BushApplicationCommandResolvable } & PermissionsOptionsExtras, - { command: BushApplicationCommandResolvable } & PermissionsOptionsExtras, - PermissionsOptionsExtras, - PermissionsGuildType, - null - >; - - public constructor(client: BushClient, iterable?: Iterable<any>) { - super(client, iterable); - } -} diff --git a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts new file mode 100644 index 0000000..443fee2 --- /dev/null +++ b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.d.ts @@ -0,0 +1,54 @@ +import { + ApplicationCommand, + ApplicationCommandManager, + ApplicationCommandPermissionData, + ApplicationCommandPermissions, + BaseManager, + Collection, + GuildApplicationCommandManager, + GuildApplicationCommandPermissionData, + Snowflake +} from 'discord.js'; +import { BushClient, BushRoleResolvable, BushUserResolvable } from '../discord-akairo/BushClient'; + +export class BushApplicationCommandPermissionsManager< + BaseOptions, + FetchSingleOptions, + FullPermissionsOptions, + GuildType, + CommandIdType +> extends BaseManager { + public constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand); + public declare readonly client: BushClient; + public commandId: CommandIdType; + public guild: GuildType; + public guildId: Snowflake | null; + public manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand; + public add( + options: FetchSingleOptions & { permissions: ApplicationCommandPermissionData[] } + ): Promise<ApplicationCommandPermissions[]>; + public has(options: FetchSingleOptions & { permissionId: BushUserResolvable | BushRoleResolvable }): Promise<boolean>; + public fetch(options: FetchSingleOptions): Promise<ApplicationCommandPermissions[]>; + public fetch(options: BaseOptions): Promise<Collection<Snowflake, ApplicationCommandPermissions[]>>; + public remove( + options: + | (FetchSingleOptions & { + users: BushUserResolvable | BushUserResolvable[]; + roles?: BushRoleResolvable | BushRoleResolvable[]; + }) + | (FetchSingleOptions & { + users?: BushUserResolvable | BushUserResolvable[]; + roles: BushRoleResolvable | BushRoleResolvable[]; + }) + ): Promise<ApplicationCommandPermissions[]>; + public set( + options: FetchSingleOptions & { permissions: ApplicationCommandPermissionData[] } + ): Promise<ApplicationCommandPermissions[]>; + public set( + options: FullPermissionsOptions & { + fullPermissions: GuildApplicationCommandPermissionData[]; + } + ): Promise<Collection<Snowflake, ApplicationCommandPermissions[]>>; + private permissionsPath(guildId: Snowflake, commandId?: Snowflake): unknown; + private static transformPermissions(permissions: ApplicationCommandPermissionData, received?: boolean): unknown; +} diff --git a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts b/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts deleted file mode 100644 index 3a98833..0000000 --- a/src/lib/extensions/discord.js/BushApplicationCommandPermissionsManager.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ApplicationCommand, - ApplicationCommandManager, - ApplicationCommandPermissionsManager, - GuildApplicationCommandManager -} from 'discord.js'; -import { BushClient } from '../discord-akairo/BushClient'; -import { BushApplicationCommand } from './BushApplicationCommand'; -import { BushApplicationCommandManager } from './BushApplicationCommandManager'; -import { BushGuildApplicationCommandManager } from './BushGuildApplicationCommandManager'; - -export class BushApplicationCommandPermissionsManager< - BaseOptions, - FetchSingleOptions, - FullPermissionsOptions, - GuildType, - CommandIdType -> extends ApplicationCommandPermissionsManager< - BaseOptions, - FetchSingleOptions, - FullPermissionsOptions, - GuildType, - CommandIdType -> { - public declare client: BushClient; - public declare manager: BushApplicationCommandManager | BushGuildApplicationCommandManager | BushApplicationCommand; - - public constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand) { - super(manager); - } -} diff --git a/src/lib/extensions/discord.js/BushClientEvents.d.ts b/src/lib/extensions/discord.js/BushClientEvents.d.ts new file mode 100644 index 0000000..6c1fec5 --- /dev/null +++ b/src/lib/extensions/discord.js/BushClientEvents.d.ts @@ -0,0 +1,6 @@ +import { ClientEvents } from 'discord.js'; +import { BushMessage } from './BushMessage'; + +export interface BushClientEvents extends ClientEvents { + messageCreate: [message: BushMessage]; +} diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index 9d618ec..dd41dad 100644 --- a/src/lib/extensions/discord.js/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -1,12 +1,13 @@ import { Guild, User } from 'discord.js'; -import { ModLogType } from '../..'; +import { BushGuildMember, ModLogType } from '../..'; import { Guild as GuildDB, GuildModel } from '../../models/Guild'; import { BushClient, BushUserResolvable } from '../discord-akairo/BushClient'; +import { BushGuildMemberManager } from './BushGuildMemberManager'; export class BushGuild extends Guild { public declare readonly client: BushClient; - // I cba to do this - //// public declare members: GuildMemberManager; + public declare readonly me: BushGuildMember | null; + public declare members: BushGuildMemberManager; public constructor(client: BushClient, data: unknown) { super(client, data); } diff --git a/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts b/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts new file mode 100644 index 0000000..c0400ce --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.d.ts @@ -0,0 +1,18 @@ +/* eslint-disable @typescript-eslint/ban-types */ +import { ApplicationCommandData, BaseFetchOptions, Collection, Snowflake } from 'discord.js'; +import { BushApplicationCommandResolvable, BushClient } from '../discord-akairo/BushClient'; +import { BushApplicationCommand } from './BushApplicationCommand'; +import { BushApplicationCommandManager } from './BushApplicationCommandManager'; +import { BushGuild } from './BushGuild'; + +export class BushGuildApplicationCommandManager extends BushApplicationCommandManager<BushApplicationCommand, {}, BushGuild> { + public constructor(guild: BushGuild, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public guild: BushGuild; + public create(command: ApplicationCommandData): Promise<BushApplicationCommand>; + public delete(command: BushApplicationCommandResolvable): Promise<BushApplicationCommand | null>; + public edit(command: BushApplicationCommandResolvable, data: ApplicationCommandData): Promise<BushApplicationCommand>; + public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<BushApplicationCommand>; + public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, BushApplicationCommand>>; + public set(commands: ApplicationCommandData[]): Promise<Collection<Snowflake, BushApplicationCommand>>; +} diff --git a/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.ts b/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.ts deleted file mode 100644 index 3dd79a4..0000000 --- a/src/lib/extensions/discord.js/BushGuildApplicationCommandManager.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { GuildApplicationCommandManager } from 'discord.js'; -import { BushGuild } from './BushGuild'; - -export class BushGuildApplicationCommandManager extends GuildApplicationCommandManager { - public declare guild: BushGuild; - public constructor(guild: BushGuild, iterable?: Iterable<any>) { - super(guild, iterable); - } -} diff --git a/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.d.ts b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.d.ts new file mode 100644 index 0000000..6e36292 --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.d.ts @@ -0,0 +1,19 @@ +import { Collection, DataManager, Snowflake } from 'discord.js'; +import { BushClient, BushRoleResolvable } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildEmoji } from './BushGuildEmoji'; +import { BushRole } from './BushRole'; + +export class BushGuildEmojiRoleManager extends DataManager<Snowflake, BushRole, BushRoleResolvable> { + public constructor(emoji: BushGuildEmoji); + public declare readonly client: BushClient; + public emoji: BushGuildEmoji; + public guild: BushGuild; + public add( + roleOrRoles: BushRoleResolvable | readonly BushRoleResolvable[] | Collection<Snowflake, BushRole> + ): Promise<BushGuildEmoji>; + public set(roles: readonly BushRoleResolvable[] | Collection<Snowflake, BushRole>): Promise<BushGuildEmoji>; + public remove( + roleOrRoles: BushRoleResolvable | readonly BushRoleResolvable[] | Collection<Snowflake, BushRole> + ): Promise<BushGuildEmoji>; +} diff --git a/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts b/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts deleted file mode 100644 index 00afb25..0000000 --- a/src/lib/extensions/discord.js/BushGuildEmojiRoleManager.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Collection, GuildEmojiRoleManager, Snowflake } from 'discord.js'; -import { BushGuild } from './BushGuild'; -import { BushGuildEmoji } from './BushGuildEmoji'; -import { BushRole } from './BushRole'; - -export class BushGuildEmojiRoleManager extends GuildEmojiRoleManager { - public declare emoji: BushGuildEmoji; - public declare guild: BushGuild; - public declare cache: Collection<Snowflake, BushRole>; - public constructor(emoji: BushGuildEmoji) { - super(emoji); - } -} diff --git a/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts new file mode 100644 index 0000000..96b99e5 --- /dev/null +++ b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts @@ -0,0 +1,35 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { + BanOptions, + CachedManager, + Collection, + FetchMemberOptions, + FetchMembersOptions, + GuildMember, + GuildMemberEditData, + GuildPruneMembersOptions, + GuildSearchMembersOptions, + Snowflake, + User, + UserResolvable +} from 'discord.js'; +import { BushClient, BushGuildMemberResolvable, BushUserResolvable } from '../discord-akairo/BushClient'; +import { BushGuild } from './BushGuild'; +import { BushGuildMember } from './BushGuildMember'; + +export class BushGuildMemberManager extends CachedManager<Snowflake, BushGuildMember, BushGuildMemberResolvable> { + public constructor(guild: BushGuild, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public guild: BushGuild; + public ban(user: BushUserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>; + public edit(user: BushUserResolvable, data: GuildMemberEditData, reason?: string): Promise<void>; + public fetch( + options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }) + ): Promise<GuildMember>; + public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>; + public kick(user: UserResolvable, reason?: string): Promise<BushGuildMember | User | Snowflake>; + public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>; + public prune(options?: GuildPruneMembersOptions): Promise<number>; + public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>; + public unban(user: UserResolvable, reason?: string): Promise<User>; +} diff --git a/src/lib/extensions/discord.js/BushGuildMemberManager.ts b/src/lib/extensions/discord.js/BushGuildMemberManager.ts deleted file mode 100644 index dbc2da5..0000000 --- a/src/lib/extensions/discord.js/BushGuildMemberManager.ts +++ /dev/null @@ -1,11 +0,0 @@ -// /* eslint-disable @typescript-eslint/no-explicit-any */ -// import { GuildMemberManager } from 'discord.js'; -// import { BushGuild } from './BushGuild'; - -// export class BushGuildMemberManager extends GuildMemberManager { -// public guild: BushGuild; - -// public constructor(guild: BushGuild, iterable?: Iterable<any>) { -// super(guild, iterable); -// } -// } diff --git a/src/lib/extensions/discord.js/BushMessageManager.d.ts b/src/lib/extensions/discord.js/BushMessageManager.d.ts new file mode 100644 index 0000000..bf795ad --- /dev/null +++ b/src/lib/extensions/discord.js/BushMessageManager.d.ts @@ -0,0 +1,33 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { + BaseFetchOptions, + CachedManager, + ChannelLogsQueryOptions, + Collection, + EmojiIdentifierResolvable, + MessageEditOptions, + MessagePayload, + Snowflake, + TextBasedChannelFields +} from 'discord.js'; +import { BushClient, BushMessageResolvable } from '../discord-akairo/BushClient'; +import { BushDMChannel } from './BushDMChannel'; +import { BushMessage } from './BushMessage'; +import { BushTextChannel } from './BushTextChannel'; +import { BushThreadChannel } from './BushThreadChannel'; + +export class BushMessageManager extends CachedManager<Snowflake, BushMessage, BushMessageResolvable> { + public constructor(channel: BushTextChannel | BushDMChannel | BushThreadChannel, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public channel: TextBasedChannelFields; + public cache: Collection<Snowflake, BushMessage>; + public crosspost(message: BushMessageResolvable): Promise<BushMessage>; + public delete(message: BushMessageResolvable): Promise<void>; + public edit(message: BushMessageResolvable, options: MessagePayload | MessageEditOptions): Promise<BushMessage>; + public fetch(message: Snowflake, options?: BaseFetchOptions): Promise<BushMessage>; + public fetch(options?: ChannelLogsQueryOptions, cacheOptions?: BaseFetchOptions): Promise<Collection<Snowflake, BushMessage>>; + public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, BushMessage>>; + public react(message: BushMessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>; + public pin(message: BushMessageResolvable): Promise<void>; + public unpin(message: BushMessageResolvable): Promise<void>; +} diff --git a/src/lib/extensions/discord.js/BushMessageManager.ts b/src/lib/extensions/discord.js/BushMessageManager.ts deleted file mode 100644 index 181808a..0000000 --- a/src/lib/extensions/discord.js/BushMessageManager.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { Collection, MessageManager, Snowflake } from 'discord.js'; -import { BushClient } from '../discord-akairo/BushClient'; -import { BushDMChannel } from './BushDMChannel'; -import { BushMessage } from './BushMessage'; -import { BushTextChannel } from './BushTextChannel'; -import { BushThreadChannel } from './BushThreadChannel'; - -export class BushMessageManager extends MessageManager { - public declare readonly client: BushClient; - public declare cache: Collection<Snowflake, BushMessage>; - public constructor(channel: BushTextChannel | BushDMChannel | BushThreadChannel, iterable?: Iterable<any>) { - super(channel, iterable); - } -} diff --git a/src/lib/extensions/discord.js/BushThreadManager.d.ts b/src/lib/extensions/discord.js/BushThreadManager.d.ts new file mode 100644 index 0000000..6b8250b --- /dev/null +++ b/src/lib/extensions/discord.js/BushThreadManager.d.ts @@ -0,0 +1,25 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { + BaseFetchOptions, + CachedManager, + FetchArchivedThreadOptions, + FetchThreadsOptions, + Snowflake, + ThreadChannelResolvable, + ThreadCreateOptions +} from 'discord.js'; +import { BushClient, BushFetchedThreads, BushThreadChannelResolvable } from '../discord-akairo/BushClient'; +import { BushNewsChannel } from './BushNewsChannel'; +import { BushTextChannel } from './BushTextChannel'; +import { BushThreadChannel } from './BushThreadChannel'; + +export class BushThreadManager<AllowedThreadType> extends CachedManager<Snowflake, BushThreadChannel, ThreadChannelResolvable> { + public constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public channel: BushTextChannel | BushNewsChannel; + public create(options: ThreadCreateOptions<AllowedThreadType>): Promise<BushThreadChannel>; + public fetch(options: BushThreadChannelResolvable, cacheOptions?: BaseFetchOptions): Promise<BushThreadChannel | null>; + public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<BushFetchedThreads>; + public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<BushFetchedThreads>; + public fetchActive(cache?: boolean): Promise<BushFetchedThreads>; +} diff --git a/src/lib/extensions/discord.js/BushThreadManager.ts b/src/lib/extensions/discord.js/BushThreadManager.ts deleted file mode 100644 index 50eaa2d..0000000 --- a/src/lib/extensions/discord.js/BushThreadManager.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { ThreadManager } from 'discord.js'; -import { BushNewsChannel } from './BushNewsChannel'; -import { BushTextChannel } from './BushTextChannel'; - -export class BushThreadManager<AllowedThreadType> extends ThreadManager<AllowedThreadType> { - public declare channel: BushTextChannel | BushNewsChannel; - public constructor(channel: BushTextChannel | BushNewsChannel, iterable?: Iterable<any>) { - super(channel, iterable); - } -} diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts new file mode 100644 index 0000000..ba9b90b --- /dev/null +++ b/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts @@ -0,0 +1,15 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +import { CachedManager, Collection, Snowflake, ThreadChannel, ThreadMember, UserResolvable } from 'discord.js'; +import { BushClient, BushThreadMemberResolvable } from '../discord-akairo/BushClient'; +import { BushThreadChannel } from './BushThreadChannel'; +import { BushThreadMember } from './BushThreadMember'; + +export class BushThreadMemberManager extends CachedManager<Snowflake, BushThreadMember, BushThreadMemberResolvable> { + public constructor(thread: BushThreadChannel, iterable?: Iterable<unknown>); + public declare readonly client: BushClient; + public thread: ThreadChannel; + public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>; + public fetch(cache?: boolean): Promise<Collection<Snowflake, ThreadMember>>; + public remove(id: Snowflake | '@me', reason?: string): Promise<Snowflake>; +} diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.ts deleted file mode 100644 index e585ee7..0000000 --- a/src/lib/extensions/discord.js/BushThreadMemberManager.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-empty-interface */ -import { ThreadMemberManager } from 'discord.js'; -import { BushClient } from '../discord-akairo/BushClient'; -import { BushThreadChannel } from './BushThreadChannel'; - -export class BushThreadMemberManager extends ThreadMemberManager { - public declare thread: BushThreadChannel; - public declare readonly client: BushClient; - - public constructor(thread: BushThreadChannel, iterable?: Iterable<unknown>) { - super(thread, iterable); - } -} diff --git a/src/lib/index.ts b/src/lib/index.ts index 73cee56..1e789e5 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -13,22 +13,16 @@ export * from './extensions/discord-akairo/BushTask'; export * from './extensions/discord-akairo/BushTaskHandler'; export * from './extensions/discord.js/BushActivity'; export * from './extensions/discord.js/BushApplicationCommand'; -export * from './extensions/discord.js/BushApplicationCommandManager'; -export * from './extensions/discord.js/BushApplicationCommandPermissionsManager'; export * from './extensions/discord.js/BushButtonInteraction'; export * from './extensions/discord.js/BushCategoryChannel'; export * from './extensions/discord.js/BushCommandInteraction'; export * from './extensions/discord.js/BushDMChannel'; export * from './extensions/discord.js/BushEmoji'; export * from './extensions/discord.js/BushGuild'; -export * from './extensions/discord.js/BushGuildApplicationCommandManager'; export * from './extensions/discord.js/BushGuildChannel'; export * from './extensions/discord.js/BushGuildEmoji'; -export * from './extensions/discord.js/BushGuildEmojiRoleManager'; export * from './extensions/discord.js/BushGuildMember'; -// export * from './extensions/discord.js/BushGuildMemberManager'; export * from './extensions/discord.js/BushMessage'; -export * from './extensions/discord.js/BushMessageManager'; export * from './extensions/discord.js/BushMessageReaction'; export * from './extensions/discord.js/BushNewsChannel'; export * from './extensions/discord.js/BushPresence'; @@ -40,9 +34,7 @@ export * from './extensions/discord.js/BushStageInstance'; export * from './extensions/discord.js/BushStoreChannel'; export * from './extensions/discord.js/BushTextChannel'; export * from './extensions/discord.js/BushThreadChannel'; -export * from './extensions/discord.js/BushThreadManager'; export * from './extensions/discord.js/BushThreadMember'; -export * from './extensions/discord.js/BushThreadMemberManager'; export * from './extensions/discord.js/BushUser'; export * from './extensions/discord.js/BushVoiceChannel'; export * from './extensions/discord.js/BushVoiceState'; diff --git a/src/lib/utils/BushConstants.ts b/src/lib/utils/BushConstants.ts index 5a99798..97f86c4 100644 --- a/src/lib/utils/BushConstants.ts +++ b/src/lib/utils/BushConstants.ts @@ -63,7 +63,7 @@ export class BushConstants { EMBED_LINKS: { name: 'Embed Links', important: false }, ATTACH_FILES: { name: 'Attach Files', important: false }, READ_MESSAGE_HISTORY: { name: 'Read Message History', important: false }, - MENTION_EVERYONE: { name: 'Mention @everyone, @here, and All Roles', important: true }, // name has a zero-width space to prevent accidents + MENTION_EVERYONE: { name: 'Mention @\u200Beveryone, @\u200Bhere, and All Roles', important: true }, // name has a zero-width space to prevent accidents USE_EXTERNAL_EMOJIS: { name: 'Use External Emoji', important: false }, VIEW_GUILD_INSIGHTS: { name: 'View Server Insights', important: true }, CONNECT: { name: 'Connect', important: false }, @@ -84,48 +84,51 @@ export class BushConstants { MANAGE_THREADS: { name: 'Manage Threads', important: true } }, + // prettier-ignore features: { - ANIMATED_ICON: { name: 'Animated Icon', important: false, emoji: '<:animatedIcon:850774498071412746>', weight: 14 }, - BANNER: { name: 'Banner', important: false, emoji: '<:banner:850786673150787614>', weight: 15 }, - COMMERCE: { name: 'Store Channels', important: true, emoji: '<:storeChannels:850786692432396338>', weight: 11 }, - COMMUNITY: { name: 'Community', important: false, emoji: '<:community:850786714271875094>', weight: 20 }, - DISCOVERABLE: { name: 'Discoverable', important: true, emoji: '<:discoverable:850786735360966656>', weight: 6 }, - ENABLED_DISCOVERABLE_BEFORE: { - name: 'Enabled Discovery Before', - important: false, - emoji: '<:enabledDiscoverableBefore:850786754670624828>', - weight: 7 - }, - FEATURABLE: { name: 'Featurable', important: true, emoji: '<:featurable:850786776372084756>', weight: 4 }, - INVITE_SPLASH: { name: 'Invite Splash', important: false, emoji: '<:inviteSplash:850786798246559754>', weight: 16 }, - MEMBER_VERIFICATION_GATE_ENABLED: { - name: 'Membership Verification Gate', - important: false, - emoji: '<:memberVerificationGateEnabled:850786829984858212>', - weight: 18 - }, - MONETIZATION_ENABLED: { name: 'Monetization Enabled', important: true, emoji: null, weight: 8 }, - MORE_EMOJI: { name: 'More Emoji', important: true, emoji: '<:moreEmoji:850786853497602080>', weight: 3 }, - MORE_STICKERS: { name: 'More Stickers', important: true, emoji: null, weight: 2 }, - NEWS: { - name: 'Announcement Channels', - important: false, - emoji: '<:announcementChannels:850790491796013067>', - weight: 17 - }, + VERIFIED: { name: 'Verified', important: true, emoji: '<:verified:850795049817473066>', weight: 0 }, PARTNERED: { name: 'Partnered', important: true, emoji: '<:partneredServer:850794851955507240>', weight: 1 }, - PREVIEW_ENABLED: { name: 'Preview Enabled', important: true, emoji: '<:previewEnabled:850790508266913823>', weight: 10 }, + 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 }, + 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 }, - VERIFIED: { name: 'Verified', important: true, emoji: '<:verified:850795049817473066>', weight: 0 }, VIP_REGIONS: { name: 'VIP Regions', important: false, emoji: '<:VIPRegions:850794697496854538>', weight: 13 }, - WELCOME_SCREEN_ENABLED: { - name: 'Welcome Screen Enabled', - important: false, - emoji: '<:welcomeScreenEnabled:850790575875817504>', - weight: 19 - } + 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 }, + NEWS: { name: 'Announcement Channels', important: false, emoji: '<:announcementChannels:850790491796013067>', weight: 21 }, + MEMBER_VERIFICATION_GATE_ENABLED: { name: 'Membership Verification Gate', important: false, emoji: '<:memberVerificationGateEnabled:850786829984858212>', weight: 22 }, + WELCOME_SCREEN_ENABLED: { name: 'Welcome Screen Enabled', important: false, emoji: '<:welcomeScreenEnabled:850790575875817504>', weight: 23 }, + COMMUNITY: { name: 'Community', important: false, emoji: '<:community:850786714271875094>', weight: 24 }, + THREADS_ENABLED: {name: 'Threads Enabled', important: false, emoji: '<:threadsEnabled:869756035345317919>', weight: 24 }, + THREADS_ENABLED_TESTING: {name: 'Threads Enabled Testing', important: false, emoji: null, weight: 24 } + }, + + regions: { + 'automatic': ':united_nations: Automatic', + 'brazil': ':flag_br: Brazil', + 'europe': ':flag_eu: Europe', + 'hongkong': ':flag_hk: Hongkong', + 'india': ':flag_in: India', + 'japan': ':flag_jp: Japan', + 'russia': ':flag_ru: Russia', + 'singapore': ':flag_sg: Singapore', + 'southafrica': ':flag_za: South Africa', + 'sydney': ':flag_au: Sydney', + 'us-central': ':flag_us: US Central', + 'us-east': ':flag_us: US East', + 'us-south': ':flag_us: US South', + 'us-west': ':flag_us: US West' }, otherEmojis: { |