blob: c7269c70fa8f92b1048b31bf3963f0050ad2ec4f [file] [log] [blame]
import { CommandInteraction, MessageEmbed, MessageSelectMenu } from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { WrappedCheck } from "jshaiku";
import readConfig from "../../utils/readConfig.js";
import { toHexArray, toHexInteger, logs } from "../../utils/calculate.js"
import { capitalize } from "../../utils/generateKeyValueList.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
.setName("menu")
.setDescription("Shows a full UI of all settings")
const callback = async (interaction: CommandInteraction) => {
return
let config = await readConfig(interaction.guild.id);
let currentValues = toHexArray(config.logging.log.toLog);
let toLogDropdownOptions = []
for(let i of logs) {
if(currentValues.includes(i)) {
toLogDropdownOptions.push({
name: capitalize(i),
value: i,
emoji: "TICK"
})
} else {
toLogDropdownOptions.push({
label: capitalize(i),
value: i,
emoji: "CROSS"
})
}
}
let toLogDropdown = new MessageSelectMenu()
.setCustomId("tolog")
.setMaxValues(22)
.addOptions()
let embed = new MessageEmbed()
interaction.reply("Command incomplete [settings/all]");
}
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
return true;
}
export { command };
export { callback };
export { check };