Skip to content

Commit

Permalink
refactor: cleanup and permissions fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranet committed Nov 9, 2023
1 parent b03a842 commit 07e1025
Show file tree
Hide file tree
Showing 106 changed files with 221 additions and 334 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"start:profiler:0x": "0x --collect-only dist/Skyra.js",
"test": "NODE_OPTIONS=\"--loader tsx/esm\" vitest",
"lint": "eslint --fix --ext ts src tests",
"format": "prettier --write --loglevel=warn \"{src,tests}/**/*.{js,ts,json}\"",
"format": "prettier --write --log-level=warn \"{src,tests}/**/*.{js,ts,json}\"",
"scripts:tlds": "node scripts/tlds.mjs",
"scripts:migration": "node scripts/migrations.mjs",
"dockerps": "pwsh -NoLogo ./.docker/control.ps1",
Expand Down Expand Up @@ -67,7 +67,6 @@
"@sapphire/stopwatch": "^1.5.0",
"@sapphire/time-utilities": "^1.7.10",
"@sapphire/utilities": "^3.13.0",
"@sentry/hub": "^7.79.0",
"@sentry/integrations": "^7.79.0",
"@sentry/node": "^7.79.0",
"@skyra/ai": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/arguments/command.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import type { SkyraCommand } from '#lib/structures';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels } from '#lib/types';
import { OWNERS } from '#root/config';
import { Argument } from '@sapphire/framework';

Expand Down
2 changes: 1 addition & 1 deletion src/arguments/commandMatch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CommandMatcher } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import type { SkyraCommand } from '#lib/structures';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels } from '#lib/types';
import { OWNERS } from '#root/config';
import { Argument } from '@sapphire/framework';

Expand Down
2 changes: 1 addition & 1 deletion src/arguments/commandName.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import type { SkyraCommand } from '#lib/structures';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels } from '#lib/types';
import { OWNERS } from '#root/config';
import { FuzzySearch } from '#utils/Parsers/FuzzySearch';
import { Argument, Command } from '@sapphire/framework';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Admin/conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { configurableGroups, isSchemaGroup, isSchemaKey, readSettings, remove, r
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SettingsMenu, SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels } from '#lib/types';
import { isValidCustomEmoji, isValidSerializedTwemoji, isValidTwemoji } from '#lib/util/functions/emojis';
import { filter, map } from '#utils/common';
import { inlineCode } from '@discordjs/builders';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Admin/roleset.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { GuildEntity, GuildSettings, readSettings, writeSettings, type UniqueRoleSet } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand, SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
import { send } from '@sapphire/plugin-editable-commands';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/General/invite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class UserCommand extends SkyraCommand {
PermissionFlagsBits.EmbedLinks |
PermissionFlagsBits.KickMembers |
PermissionFlagsBits.ManageChannels |
PermissionFlagsBits.ManageEmojisAndStickers |
PermissionFlagsBits.ManageGuildExpressions |
PermissionFlagsBits.ManageGuild |
PermissionFlagsBits.ManageMessages |
PermissionFlagsBits.ManageNicknames |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { GuildSettings, readSettings, writeSettings } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { minutes, seconds } from '#utils/common';
import { ApplyOptions } from '@sapphire/decorators';
import type { GuildTextBasedChannelTypes } from '@sapphire/discord.js-utilities';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { GuildSettings, readSettings, writeSettings } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
import { send } from '@sapphire/plugin-editable-commands';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { GuildSettings, readSettings, writeSettings, type ReactionRole } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraPaginatedMessage, SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { getEmojiString, getEmojiTextFormat } from '#utils/functions';
import { LongLivingReactionCollector } from '#utils/LongLivingReactionCollector';
import { getColor, sendLoadingMessage } from '#utils/util';
Expand Down
5 changes: 2 additions & 3 deletions src/commands/Management/Configuration/setIgnoreChannels.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { GuildSettings, writeSettings } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { ApplyOptions } from '@sapphire/decorators';
import type { GuildTextBasedChannelTypes } from '@sapphire/discord.js-utilities';
import { Args, CommandOptionsRunTypeEnum, container, Argument } from '@sapphire/framework';
import { Args, Argument, CommandOptionsRunTypeEnum, container } from '@sapphire/framework';
import { send } from '@sapphire/plugin-editable-commands';

@ApplyOptions<SkyraCommand.Options>({
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Management/Configuration/setPrefix.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { GuildSettings, writeSettings } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
import { send } from '@sapphire/plugin-editable-commands';
Expand Down
4 changes: 2 additions & 2 deletions src/commands/Management/Helpers/guild-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { isCategoryChannel, isNewsChannel, isStageChannel, isTextChannel, isVoic
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
import { send } from '@sapphire/plugin-editable-commands';
import { chunk } from '@sapphire/utilities';
import { PermissionFlagsBits } from 'discord-api-types/v10';
import { GuildVerificationLevel, PermissionFlagsBits } from 'discord-api-types/v10';
import { EmbedBuilder, PermissionsBitField, Role } from 'discord.js';

const SORT = (x: Role, y: Role) => Number(y.position > x.position) || Number(x.position === y.position) - 1;
Expand Down Expand Up @@ -179,7 +179,7 @@ export class UserCommand extends SkyraCommand {
return args.t(LanguageKeys.Commands.Management.GuildInfoOther, {
size: guild.roles.cache.size,
createdAt: time(seconds.fromMilliseconds(guild.createdTimestamp), TimestampStyles.ShortDateTime),
verificationLevel: guild.verificationLevel
verificationLevel: GuildVerificationLevel[guild.verificationLevel]
});
}
}
16 changes: 8 additions & 8 deletions src/commands/Management/Helpers/role-info.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { PermissionsBits } from '#utils/bits';
import { BrandingColors } from '#utils/constants';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
Expand All @@ -21,12 +21,12 @@ export class UserCommand extends SkyraCommand {
const role = args.finished ? message.member.roles.highest : await args.pick('roleName');
const roleInfoTitles = args.t(LanguageKeys.Commands.Management.RoleInfoTitles);

const permissions = role.permissions.has(PermissionFlagsBits.Administrator)
const permissions = role.permissions.bitfield;
const permissionsString = PermissionsBits.has(permissions, PermissionFlagsBits.Administrator)
? args.t(LanguageKeys.Commands.Management.RoleInfoAll)
: role.permissions.toArray().length > 0
? role.permissions
.toArray()
.map((key) => `+ **${args.t(`permissions:${key}`, key)}**`)
: permissions > 0n
? PermissionsBits.toArray(permissions)
.map((name) => `+ ${args.t(`permissions:${name}`)}`)
.join('\n')
: args.t(LanguageKeys.Commands.Management.RoleInfoNoPermissions);

Expand All @@ -40,7 +40,7 @@ export class UserCommand extends SkyraCommand {
.setColor(role.color || BrandingColors.Secondary)
.setTitle(`${role.name} [${role.id}]`)
.setDescription(description)
.addFields({ name: roleInfoTitles.PERMISSIONS, value: permissions });
.addFields({ name: roleInfoTitles.PERMISSIONS, value: permissionsString });
return send(message, { embeds: [embed] });
}
}
3 changes: 1 addition & 2 deletions src/commands/Management/Members/stickyRoles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { getStickyRoles } from '#utils/functions';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Management/Message Filters/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { GuildEntity, GuildSettings, readSettings, writeSettings } from '#lib/da
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { IncomingType, OutgoingType } from '#lib/moderation/workers';
import { SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
import { send } from '@sapphire/plugin-editable-commands';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Management/create-mute.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { GuildSettings, writeSettings } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { minutes } from '#utils/common';
import { Emojis } from '#utils/constants';
import { getEmojiReactionFormat, getSecurity, promptConfirmation, promptForMessage, type SerializedEmoji } from '#utils/functions';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Management/permissionNodes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { GuildSettings, PermissionNodeAction, readSettings, writeSettings, type PermissionsNode } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { resolveOnErrorCodes } from '#utils/common';
import { ApplyOptions } from '@sapphire/decorators';
import { Args, CommandOptionsRunTypeEnum } from '@sapphire/framework';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Misc/remindme.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ScheduleEntity } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand, SkyraPaginatedMessage } from '#lib/structures';
import { Schedules } from '#lib/types/Enums';
import { Schedules } from '#lib/types';
import { ButtonInviteTeryl, ButtonSkyraV7, makeRow } from '#utils/deprecate';
import { getColor, getFullEmbedAuthor, sendLoadingMessage } from '#utils/util';
import { ApplyOptions, RequiresClientPermissions } from '@sapphire/decorators';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Misc/snipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { getSnipedMessage } from '#utils/functions';
import { getColor, getContent, getFullEmbedAuthor, getImage } from '#utils/util';
import { ApplyOptions } from '@sapphire/decorators';
Expand Down
6 changes: 4 additions & 2 deletions src/commands/Moderation/Management/history.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { ModerationEntity } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraPaginatedMessage, SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { seconds } from '#utils/common';
import { getModeration } from '#utils/functions';
import { TypeVariation } from '#utils/moderationConstants';
Expand Down Expand Up @@ -56,6 +55,9 @@ export class UserCommand extends SkyraSubcommand {
break;
case TypeVariation.Warning:
++warnings;
break;
default:
break;
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/Management/moderations.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { ModerationEntity } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand, SkyraPaginatedMessage, SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { seconds } from '#utils/common';
import { getModeration } from '#utils/functions';
import { TypeCodes } from '#utils/moderationConstants';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/Management/mutes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import type { UserPaginatedMessageCommand as Moderations } from '#root/commands/Moderation/Management/moderations';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/Management/warnings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import type { UserPaginatedMessageCommand as Moderations } from '#root/commands/Moderation/Management/moderations';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
Expand Down
5 changes: 2 additions & 3 deletions src/commands/Moderation/Utilities/case.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand, SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { getModeration } from '#utils/functions';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
Expand Down Expand Up @@ -36,7 +35,7 @@ export class UserCommand extends SkyraSubcommand {
const entry = await moderation.fetch(caseId);
if (!entry) this.error(LanguageKeys.Commands.Moderation.ReasonNotExists);

entry.remove();
await entry.remove();
moderation.delete(entry.caseId);

const content = args.t(LanguageKeys.Commands.Moderation.CaseDeleted, { case: entry.caseId });
Expand Down
14 changes: 6 additions & 8 deletions src/commands/Moderation/Utilities/permissions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { PermissionsBits, PermissionsBitsList } from '#utils/bits';
import { ZeroWidthSpace } from '#utils/constants';
import { getColor, getTag } from '#utils/util';
import { ApplyOptions } from '@sapphire/decorators';
Expand All @@ -10,8 +10,6 @@ import { send } from '@sapphire/plugin-editable-commands';
import { PermissionFlagsBits } from 'discord-api-types/v10';
import { EmbedBuilder } from 'discord.js';

const PERMISSION_FLAGS = Object.keys(PermissionFlagsBits) as (keyof typeof PermissionFlagsBits)[];

@ApplyOptions<SkyraCommand.Options>({
description: LanguageKeys.Commands.Moderation.PermissionsDescription,
detailedDescription: LanguageKeys.Commands.Moderation.PermissionsExtended,
Expand All @@ -26,14 +24,14 @@ export class UserCommand extends SkyraCommand {
this.error(LanguageKeys.Misc.UserNotInGuild);
});

const { permissions } = member;
const permissions = member.permissions.bitfield;
const list = [ZeroWidthSpace];

if (permissions.has(PermissionFlagsBits.Administrator)) {
if (PermissionsBits.has(permissions, PermissionFlagsBits.Administrator)) {
list.push(args.t(LanguageKeys.Commands.Moderation.PermissionsAll));
} else {
for (const flag of PERMISSION_FLAGS) {
list.push(`${permissions.has(flag) ? '🔹' : '🔸'} ${args.t(`permissions:${flag}`, flag)}`);
for (const [name, flag] of PermissionsBitsList) {
list.push(`${PermissionsBits.has(permissions, flag) ? '🔹' : '🔸'} ${args.t(`permissions:${name}`)}`);
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/Utilities/reason.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { Events, PermissionLevels } from '#lib/types/Enums';
import { Events, PermissionLevels, type GuildMessage } from '#lib/types';
import { getModeration, sendTemporaryMessage } from '#utils/functions';
import { getImage } from '#utils/util';
import { ApplyOptions } from '@sapphire/decorators';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/Utilities/slowmode.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types/Discord';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { hours, seconds } from '#utils/common';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/Utilities/time.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { ModerationEntity } from '#lib/database';
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { seconds, years } from '#utils/common';
import { getModeration, getSecurity } from '#utils/functions';
import { SchemaKeys, TypeCodes } from '#utils/moderationConstants';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/addrole.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { ModerationCommand, type HandledCommandContext } from '#lib/moderation';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { years } from '#utils/common';
import { getSecurity } from '#utils/functions';
import { getImage } from '#utils/util';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/dehoist.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { SkyraCommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { getColor, sendLoadingMessage } from '#utils/util';
import { ApplyOptions } from '@sapphire/decorators';
import { CommandOptionsRunTypeEnum } from '@sapphire/framework';
Expand Down
3 changes: 1 addition & 2 deletions src/commands/Moderation/lockdown.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LanguageKeys } from '#lib/i18n/languageKeys';
import { LockdownManager, SkyraSubcommand } from '#lib/structures';
import type { GuildMessage } from '#lib/types';
import { PermissionLevels } from '#lib/types/Enums';
import { PermissionLevels, type GuildMessage } from '#lib/types';
import { floatPromise } from '#utils/common';
import { assertNonThread, getSecurity } from '#utils/functions';
import { clearAccurateTimeout, setAccurateTimeout } from '#utils/Timers';
Expand Down
Loading

0 comments on commit 07e1025

Please sign in to comment.