From ea549295bb5271b0b31852ebf9aa84f95f43d92d Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 19 Jun 2022 16:58:07 -0400 Subject: refactoring --- src/lib/models/instance/Guild.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/lib/models/instance') diff --git a/src/lib/models/instance/Guild.ts b/src/lib/models/instance/Guild.ts index 7a19b72..f0cac74 100644 --- a/src/lib/models/instance/Guild.ts +++ b/src/lib/models/instance/Guild.ts @@ -1,4 +1,4 @@ -import { ChannelType, type Snowflake } from 'discord.js'; +import { ChannelType, Constants, type Snowflake } from 'discord.js'; import { type Sequelize } from 'sequelize'; import { BadWordDetails } from '../../common/AutoMod.js'; import { type BushClient } from '../../extensions/discord-akairo/BushClient.js'; @@ -269,13 +269,7 @@ export const guildSettingsObj = asGuildSetting({ name: 'No Xp Channels', description: 'Channels where users will not earn xp for leveling.', type: 'channel-array', - subType: [ - ChannelType.GuildText, - ChannelType.GuildNews, - ChannelType.GuildNewsThread, - ChannelType.GuildPublicThread, - ChannelType.GuildPrivateThread - ] + subType: Constants.TextBasedChannelTypes.filter((type) => type !== ChannelType.DM) }, levelRoles: { name: 'Level Roles', @@ -287,13 +281,7 @@ export const guildSettingsObj = asGuildSetting({ name: 'Level Up Channel', description: 'The channel to send level up messages in instead of last channel.', type: 'channel', - subType: [ - ChannelType.GuildText, - ChannelType.GuildNews, - ChannelType.GuildNewsThread, - ChannelType.GuildPublicThread, - ChannelType.GuildPrivateThread - ] + subType: Constants.TextBasedChannelTypes.filter((type) => type !== ChannelType.DM) } }); -- cgit