mirror of https://github.com/clickscodes/nucleus
Co-authored-by: PineappleFan <PineaFan@users.noreply.github.com> Co-authored-by: Grey, Skyler <ST137303@hillsroad.ac.uk>pull/11/head
parent
f4facde097
commit
a112f61ac6
@ -0,0 +1,8 @@
|
|||||||
|
import { group } from "../../../utils/commandRegistration/slashCommandBuilder.js";
|
||||||
|
|
||||||
|
const name = "filters";
|
||||||
|
const description = "Settings for filters";
|
||||||
|
|
||||||
|
const subcommand = await group(name, description, `settings/filters`)
|
||||||
|
|
||||||
|
export { name, description, subcommand as command};
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
import type { CommandInteraction, GuildMember, SlashCommandSubcommandBuilder } from "discord.js";
|
||||||
|
import client from "../../utils/client.js";
|
||||||
|
|
||||||
|
|
||||||
|
const command = (builder: SlashCommandSubcommandBuilder) =>
|
||||||
|
builder
|
||||||
|
.setName("tracks")
|
||||||
|
.setDescription("Manage the tracks for the server")
|
||||||
|
|
||||||
|
|
||||||
|
const callback = async (interaction: CommandInteraction) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const check = (interaction: CommandInteraction, _partial: boolean = false) => {
|
||||||
|
const member = interaction.member as GuildMember;
|
||||||
|
if (!member.permissions.has("ManageRoles"))
|
||||||
|
return "You must have the *Manage Server* permission to use this command";
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
export { command };
|
||||||
|
export { callback };
|
||||||
|
export { check };
|
||||||
Loading…
Reference in new issue