Beginning work on BreadAsleep, need to find an intelligent way to get database access to command callbacks
This commit is contained in:
55
src/commands/breadasleep.ts
Normal file
55
src/commands/breadasleep.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { CommandInteraction, SlashCommandBuilder, SlashCommandSubcommandBuilder } from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
enabled: true,
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('breadasleep')
|
||||
.setDescription("Set, list, or remove Bread Asleep notification configurations")
|
||||
.addSubcommand((subcommand) =>
|
||||
subcommand
|
||||
.setName("list")
|
||||
.setDescription("Lists any existing Bread Asleep configurations")
|
||||
)
|
||||
.addSubcommand((subcommand) =>
|
||||
subcommand
|
||||
.setName("set")
|
||||
.setDescription("Sets the Bread Asleep configuration for a given role")
|
||||
.addRoleOption((option) =>
|
||||
option
|
||||
.setName("role")
|
||||
.setDescription("The role to apply the configuration to")
|
||||
.setRequired(true)
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName("starttime")
|
||||
.setDescription("The time when Bread Asleep warnings will start in 24 hour HH:MM:SS format")
|
||||
.setRequired(true)
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName("endtime")
|
||||
.setDescription("The time when Bread Asleep warnings will end in 24 hour HH:MM:SS format")
|
||||
.setRequired(true)
|
||||
)
|
||||
.addIntegerOption((option) =>
|
||||
option
|
||||
.setName("timeoutduration")
|
||||
.setDescription("The amount of time Bread Asleep will wait between sending warnings in minutes, default 5 minutes")
|
||||
)
|
||||
)
|
||||
.addSubcommand((subcommand) =>
|
||||
subcommand
|
||||
.setName("remove")
|
||||
.setDescription("Removes the Bread Asleep configuration for a given role")
|
||||
.addRoleOption((option) =>
|
||||
option
|
||||
.setName("role")
|
||||
.setDescription("The role to remove the Bread Asleep configuration from")
|
||||
)
|
||||
),
|
||||
async execute(interaction: CommandInteraction) {
|
||||
await interaction.reply("NOT IMPLEMENTED")
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user