aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush/rule.ts
diff options
context:
space:
mode:
authorTymanWasTaken <tyman@tyman.tech>2021-05-17 15:37:57 -0400
committerTymanWasTaken <tyman@tyman.tech>2021-05-17 15:37:57 -0400
commitb27d09d2e18a936fe727b2d4254cab7589f61f1f (patch)
tree177e0ca41cef2f78bb65b09199d6e7ca5faa1671 /src/commands/moulberry-bush/rule.ts
parent9aee8c80067530b178612f1261c38b83683f266d (diff)
downloadtanzanite-b27d09d2e18a936fe727b2d4254cab7589f61f1f.tar.gz
tanzanite-b27d09d2e18a936fe727b2d4254cab7589f61f1f.tar.bz2
tanzanite-b27d09d2e18a936fe727b2d4254cab7589f61f1f.zip
it didn't work
Diffstat (limited to 'src/commands/moulberry-bush/rule.ts')
-rw-r--r--src/commands/moulberry-bush/rule.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts
index a9414ea..63172d1 100644
--- a/src/commands/moulberry-bush/rule.ts
+++ b/src/commands/moulberry-bush/rule.ts
@@ -103,7 +103,7 @@ export default class RuleCommand extends BotCommand {
channel: 'guild',
slashCommandOptions: [
{
- type: ApplicationCommandOptionType.STRING,
+ type: ApplicationCommandOptionType.INTEGER,
name: 'rule',
description: 'The rule to show',
required: false
@@ -138,11 +138,11 @@ export default class RuleCommand extends BotCommand {
);
}
if (rule) {
- const foundRule = this.rules[rule];
- rulesEmbed.addField(foundRule.title, foundRule.description);
+ const foundRule = this.rules[rule - 1];
+ rulesEmbed.addField(`${rule}) ${foundRule.title}`, foundRule.description);
} else {
for (const curRule of this.rules) {
- rulesEmbed.addField(curRule.title, curRule.description);
+ rulesEmbed.addField(`${this.rules.indexOf(curRule) + 1}) ${curRule.title}`, curRule.description);
}
}
if (!user) {