TheCodedProf | a112f61 | 2023-01-28 18:06:45 -0500 | [diff] [blame^] | 1 | import type { CommandInteraction, GuildMember, SlashCommandSubcommandBuilder } from "discord.js"; |
| 2 | import client from "../../utils/client.js"; |
| 3 | |
| 4 | |
| 5 | const command = (builder: SlashCommandSubcommandBuilder) => |
| 6 | builder |
| 7 | .setName("tracks") |
| 8 | .setDescription("Manage the tracks for the server") |
| 9 | |
| 10 | |
| 11 | const callback = async (interaction: CommandInteraction) => { |
| 12 | |
| 13 | |
| 14 | |
| 15 | } |
| 16 | |
| 17 | const check = (interaction: CommandInteraction, _partial: boolean = false) => { |
| 18 | const member = interaction.member as GuildMember; |
| 19 | if (!member.permissions.has("ManageRoles")) |
| 20 | return "You must have the *Manage Server* permission to use this command"; |
| 21 | return true; |
| 22 | }; |
| 23 | |
| 24 | export { command }; |
| 25 | export { callback }; |
| 26 | export { check }; |