aboutsummaryrefslogtreecommitdiff
path: root/src/commands/admin
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/admin')
-rw-r--r--src/commands/admin/channelPermissions.ts8
-rw-r--r--src/commands/admin/roleAll.ts6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts
index 17bea40..b94094c 100644
--- a/src/commands/admin/channelPermissions.ts
+++ b/src/commands/admin/channelPermissions.ts
@@ -1,5 +1,5 @@
-import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '#lib';
-import { MessageEmbed, type GuildMember, type PermissionString, type Role } from 'discord.js';
+import { ArgType, BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '#lib';
+import { MessageEmbed } from 'discord.js';
export default class ChannelPermissionsCommand extends BushCommand {
public constructor() {
@@ -57,8 +57,8 @@ export default class ChannelPermissionsCommand extends BushCommand {
public override async exec(
message: BushMessage | BushSlashMessage,
args: {
- target: Role | GuildMember;
- permission: PermissionString;
+ target: ArgType<'member'> | ArgType<'role'>;
+ permission: ArgType<'permission'>;
state: 'true' | 'false' | 'neutral';
}
) {
diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts
index 585e6cc..a946e33 100644
--- a/src/commands/admin/roleAll.ts
+++ b/src/commands/admin/roleAll.ts
@@ -1,5 +1,5 @@
-import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
-import { type GuildMember, type Role } from 'discord.js';
+import { AllowedMentions, ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
+import { type GuildMember } from 'discord.js';
export default class RoleAllCommand extends BushCommand {
public constructor() {
@@ -37,7 +37,7 @@ export default class RoleAllCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage, args: { role: Role; bots: boolean }) {
+ public override async exec(message: BushMessage | BushSlashMessage, args: { role: ArgType<'role'>; bots: boolean }) {
if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be run in a server.`);
if (!message.member!.permissions.has('ADMINISTRATOR') && !message.member!.user.isOwner())
return await message.util.reply(`${util.emojis.error} You must have admin perms to use this command.`);