mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-09 04:02:40 -05:00
Add all descriptions to q command
This commit is contained in:
parent
8ced78193a
commit
076e40daef
|
|
@ -44,13 +44,13 @@ function addSubcommands(builder: SlashCommandBuilder) {
|
|||
builder.addSubcommand((subcommand) => {
|
||||
const result = subcommand
|
||||
.setName(key)
|
||||
.setDescription(`TODO: explanation for ${key} command`);
|
||||
.setDescription(keyToDescription(key));
|
||||
|
||||
if (typeof value !== "string") {
|
||||
result.addStringOption((option) =>
|
||||
option
|
||||
.setName(WAVE_ARG)
|
||||
.setDescription("TODO: wave desc")
|
||||
.setDescription("Type of map")
|
||||
.setRequired(true)
|
||||
.addChoices(
|
||||
...Object.keys(value).map((key) => ({
|
||||
|
|
@ -77,3 +77,34 @@ function toContent(value: string | string[]) {
|
|||
|
||||
return value.join("\n");
|
||||
}
|
||||
|
||||
function keyToDescription(key: string) {
|
||||
const descriptions = new Map([
|
||||
["sg", "Spawning Grounds maps"],
|
||||
["mb", "Marooner's Bay maps"],
|
||||
["lo", "Lost Outpost maps"],
|
||||
["ss", "Salmonid Smokeyard maps"],
|
||||
["ap", "Ruins of Ark Polaris maps"],
|
||||
[
|
||||
"fundamentals",
|
||||
"Written guide going over all the Overfishing fundamentals",
|
||||
],
|
||||
[
|
||||
"fundamentals2",
|
||||
"Live video that goes into some Overfishing fundamentals",
|
||||
],
|
||||
["advanced", "Written guide going over advanced Overfishing strategies"],
|
||||
["spawns", "Table showing spawn timers"],
|
||||
|
||||
["ballpoint", "Video guide explaining the basics of Ballpoint in SR"],
|
||||
["explo", "Video guide explaining the basics of Explosher in SR"],
|
||||
["dynamo", "Video guide explaining the basics of Dynamo in SR"],
|
||||
["bamboo", "Video guide explaining the basics of Bamboo in SR"],
|
||||
["hydra", "Video guide explaining the basics of Hydra in SR"],
|
||||
]);
|
||||
|
||||
const result = descriptions.get(key);
|
||||
if (!result) throw new Error(`Unknown subcommand: ${key}`);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user