mirror of
https://github.com/ReVax-2007/cipher_master.git
synced 2026-09-17 21:32:27 +00:00
Add bundled JSON quote fallback, responsive UI, Discord slash commands, Android setup documentation, and complete integration installation instructions. Set the Tauri application version to 1.1.0 for the release.
12 lines
863 B
JavaScript
12 lines
863 B
JavaScript
import { REST, Routes, SlashCommandBuilder } from "discord.js";
|
|
|
|
const commands = [
|
|
new SlashCommandBuilder().setName("cipher").setDescription("Create a Cipher Master challenge").addStringOption(option => option.setName("type").setDescription("Cipher to use").setRequired(false).addChoices({ name: "Caesar", value: "caesar" }, { name: "Atbash", value: "atbash" })),
|
|
new SlashCommandBuilder().setName("hint").setDescription("Get a private hint for your current challenge"),
|
|
new SlashCommandBuilder().setName("solution").setDescription("Get the private solution for your current challenge")
|
|
].map(command => command.toJSON());
|
|
|
|
const rest = new REST({ version: "10" }).setToken(process.env.DISCORD_TOKEN);
|
|
await rest.put(Routes.applicationCommands(process.env.DISCORD_CLIENT_ID), { body: commands });
|
|
console.log("Registered /cipher, /hint, and /solution.");
|