diff --git a/package-lock.json b/package-lock.json index 04ee946..2b49ccd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "ISC", "dependencies": { "@reduxjs/toolkit": "^1.8.5", + "discord-api-types": "^0.37.12", "discord.js": "^14.5.0", "dotenv": "^16.0.3", "ts-postgres": "^1.3.0" @@ -17,7 +18,6 @@ "devDependencies": { "@tsconfig/node18": "^1.0.1", "@types/pg": "^8.6.5", - "discord-api-types": "^0.37.12", "jest": "^29.1.2", "ts-jest": "^29.0.3", "ts-node": "^10.9.1", diff --git a/src/main.ts b/src/main.ts index 6d53b31..c9fd838 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,311 @@ -import { REST, Routes, ApplicationCommandDataResolvable } from 'discord.js' +import {ApplicationCommandDataResolvable, ApplicationCommandOptionType, ApplicationCommandType} from 'discord.js' const commands: ApplicationCommandDataResolvable[] = [ - + { + name: "character", + type: ApplicationCommandType.ChatInput, + description: "Commands to manage your characters.", + options: [ + { + name: "create", + type: ApplicationCommandOptionType.Subcommand, + description: "Creates a new character. Activates them on the current server.", + options: [ + { + name: "template", + type: ApplicationCommandOptionType.String, + description: "Optionally, an existing character of yours to use as a template.", + autocomplete: true, + required: false, + }, + ], + }, + { + name: "select", + type: ApplicationCommandOptionType.Subcommand, + description: "Selects a character for use with other commands used in this server. Activates them on the current server.", + options: [ + { + name: "character", + type: ApplicationCommandOptionType.String, + description: "The character to switch to. If not supplied, shows you the current selected character.", + autocomplete: true, + required: false, + }, + ], + }, + { + name: "activate", + type: ApplicationCommandOptionType.Subcommand, + description: "Allows a character to be targeted on the current server.", + options: [ + { + name: "character", + type: ApplicationCommandOptionType.String, + description: "The character to activate on this server.", + autocomplete: true, + required: false, + }, + ] + }, + { + name: "deactivate", + type: ApplicationCommandOptionType.Subcommand, + description: "Prevents a character from being targeted on the current server. Deselects them if they're selected.", + options: [ + { + name: "character", + type: ApplicationCommandOptionType.String, + description: "The character to deactivate on this server." + } + ] + }, + { + name: "edit", + type: ApplicationCommandOptionType.Subcommand, + description: "Edits an existing character. Note that characters currently in battle cannot be edited.", + options: [ + { + name: "character", + type: ApplicationCommandOptionType.String, + description: "An existing character of yours to edit. Omit to see a list.", + autocomplete: true, + required: false, + }, + ], + }, + { + name: "list", + type: ApplicationCommandOptionType.Subcommand, + description: "Lists your characters.", + options: [ + { + name: "public", + type: ApplicationCommandOptionType.Boolean, + description: "True to share your character list with the current channel.", + required: false, + } + ], + }, + { + name: "show", + type: ApplicationCommandOptionType.Subcommand, + description: "Shows the data about one of your characters.", + options: [ + { + name: "character", + type: ApplicationCommandOptionType.String, + description: "An existing character of yours to display in the current channel. Omit to display the current character.", + autocomplete: true, + required: false, + }, + { + name: "public", + type: ApplicationCommandOptionType.Boolean, + description: "True to share your character list with the current channel.", + required: false, + } + ], + }, + { + name: "archive", + type: ApplicationCommandOptionType.Subcommand, + description: "Removes a character from all servers and hides it from the default list view. Note that characters currently in battle cannot be archived.", + options: [ + { + name: "character", + type: ApplicationCommandOptionType.String, + description: "An existing unarchived character of yours to add to the archive.", + autocomplete: true, + required: false, + }, + ], + }, + { + name: "unarchive", + type: ApplicationCommandOptionType.Subcommand, + description: "Unarchives a character. If used in a server, the character will automatically be added to that server.", + options: [ + { + name: "character", + type: ApplicationCommandOptionType.String, + description: "An existing archived character of yours to take back out of the archive.", + autocomplete: true, + required: false, + }, + ], + }, + ], + }, + { + name: "team", + type: ApplicationCommandType.ChatInput, + description: "Affects teams in battle.", + options: [ + { + name: "join", + type: ApplicationCommandOptionType.Subcommand, + description: "Leaves the current team, if any, and requests to join the same team as another player. Joins the battle if not already participating." + }, + { + name: "leave", + type: ApplicationCommandOptionType.Subcommand, + description: "Leaves the current team, if any, and strikes it out alone." + }, + ], + }, + { + name: "challenge", + type: ApplicationCommandType.ChatInput, + description: "Challenges another character to a battle.", + options: [ + { + name: "", + } + ] + }, + { + name: "battle", + type: ApplicationCommandType.ChatInput, + description: "Takes actions in battle.", + options: [ + { + name: "menu", + type: ApplicationCommandOptionType.Subcommand, + description: "Opens the battle menu to select an action for this turn.", + }, + { + name: "skill", + type: ApplicationCommandOptionType.Subcommand, + description: "Uses a skill.", + options: [ + { + name: "name", + type: ApplicationCommandOptionType.String, + description: "The name of the skill to use. Omit to see a list.", + autocomplete: true, + required: false, + }, + { + name: "target", + type: ApplicationCommandOptionType.String, + description: "The target to use the skill on, if there are multiple options. Omit to see a list.", + autocomplete: true, + required: false, + }, + ], + }, + { + name: "item", + type: ApplicationCommandOptionType.Subcommand, + description: "Uses an item.", + options: [ + { + name: "name", + type: ApplicationCommandOptionType.String, + description: "The name of the item to use. Omit to see a list.", + autocomplete: true, + required: false, + }, + { + name: "target", + type: ApplicationCommandOptionType.String, + description: "The target to use the item on, if there are multiple options. Omit to see a list.", + autocomplete: true, + required: false, + }, + ] + }, + { + name: "vore", + type: ApplicationCommandOptionType.Subcommand, + description: "Devours your opponent. Requires your opponent to be at low Confidence.", + options: [ + { + name: "style", + type: ApplicationCommandOptionType.String, + description: "The style of devouring to use. Omit to see a list.", + autocomplete: true, + required: false, + }, + ] + }, + { + name: "rest", + type: ApplicationCommandOptionType.Subcommand, + description: "Takes a breather, recovering your Confidence and Energy at a faster-than-normal rate for this turn." + }, + { + name: "escape", + type: ApplicationCommandOptionType.Subcommand, + description: "Tries to escape from a battle or stomach. Requires your opponent to be at low Confidence." + }, + { + name: "surrender", + type: ApplicationCommandOptionType.Subcommand, + description: "Lets your opponent do as they will with you by your Confidence or Health to 0." + }, + { + name: "prey", + type: ApplicationCommandOptionType.SubcommandGroup, + description: "Commands for when you have a full belly.", + options: [ + { + name: "release", + type: ApplicationCommandOptionType.Subcommand, + description: "Releases your prey from your stomach." + }, + { + name: "squish", + type: ApplicationCommandOptionType.Subcommand, + description: "Squishes your prey, ending the combat. Can only be performed when the prey is at or below 0% Health." + }, + ], + }, + ], + }, + { + name: "safety", + type: ApplicationCommandType.ChatInput, + description: "Safety commands for protecting consent and user data.", + options: [ + { + name: "decline", + type: ApplicationCommandOptionType.Subcommand, + description: "Declines a challenge for reasons of consent.", + }, + { + name: "exit", + type: ApplicationCommandOptionType.SubcommandGroup, + description: "Exits battle(s) and reverts its/their effects on you for reasons of consent. To flee, use /battle escape.", + }, + { + name: "block", + type: ApplicationCommandOptionType.SubcommandGroup, + description: "Prevents a user from challenging you.", + }, + { + name: "kick", + type: ApplicationCommandOptionType.SubcommandGroup, + description: "Kicks a user from a battle and prevents them from rejoining for reasons of consent.", + }, + { + name: "ban", + type: ApplicationCommandOptionType.SubcommandGroup, + description: "Prevents a user from participating in battles in the current server, and kicks them from any they're in.", + }, + { + name: "delete", + type: ApplicationCommandOptionType.Subcommand, + description: "PERMANENTLY deletes a character, aborting any battles they were part of. To hide characters without deleting them, use /character archive.", + }, + { + name: "wipe", + type: ApplicationCommandOptionType.Subcommand, + description: "PERMANENTLY deletes all data about you in the system, aborting any battles you were part of and erasing you from the system's knowledge.", + }, + ], + } ] function main() {