|
@@ -80,7 +80,10 @@ export class GuideCommands {
|
|
|
@Command({
|
|
|
pattern: /^make (\w+)\s+name:(.+)\s*keywords:(.+)\s*contents:((.*[\n\r]*)+)$/i,
|
|
|
auth: true,
|
|
|
- documentation: "Creates a new guide of the specified type, the specified keywords and content."
|
|
|
+ documentation: {
|
|
|
+ description: "Creates a new guide of the specified type, the specified keywords and content.",
|
|
|
+ example: "make <GUIDE TYPE> <NEWLINE>name: <NAME> <NEWLINE> keywords: <KEYWORDS> <NEWLINE> contents: <CONTENTS>"
|
|
|
+ }
|
|
|
})
|
|
|
async makeGuide(msg: Message, content: string, match: RegExpMatchArray) {
|
|
|
if (!await isAuthorisedAsync(msg.member)) return;
|
|
@@ -159,7 +162,10 @@ export class GuideCommands {
|
|
|
@Command({
|
|
|
pattern: /^delete (\w+)\s+(.+)$/i,
|
|
|
auth: true,
|
|
|
- documentation: "delete <guidetype> <keywords>"
|
|
|
+ documentation: {
|
|
|
+ example: "delete <guidetype> <keywords>",
|
|
|
+ description: "Deletes a guide with the specified keywords"
|
|
|
+ }
|
|
|
})
|
|
|
async deleteGuide(msg: Message, content: string, match: RegExpMatchArray) {
|
|
|
if (!await isAuthorisedAsync(msg.member)) return;
|
|
@@ -196,17 +202,17 @@ export class GuideCommands {
|
|
|
await msg.channel.send(`${msg.author.toString()} No such ${type} with keywords \`${keywords.join(" ")}\`! Did you forget to specify all keywords?`);
|
|
|
}
|
|
|
|
|
|
- @Command({ pattern: "guides", documentation: "Lists all guides and keywords that trigger them." })
|
|
|
+ @Command({ pattern: "guides", documentation: { description: "Lists all guides and keywords that trigger them.", example: "guides" } })
|
|
|
async showGuides(msg: Message) {
|
|
|
await this.listGuides(msg, "guide", "Here are the guides I have:");
|
|
|
}
|
|
|
|
|
|
- @Command({ pattern: "memes", documentation: "Lists all memes and keywords that trigger them." })
|
|
|
+ @Command({ pattern: "memes", documentation: {description: "Lists all memes and keywords that trigger them.", example: "memes"} })
|
|
|
async showMemes(msg: Message) {
|
|
|
await this.listGuides(msg, "meme", "Here are some random memes I have:")
|
|
|
}
|
|
|
|
|
|
- @Command({ pattern: "misc", documentation: "Lists all additional keywords the bot reacts to." })
|
|
|
+ @Command({ pattern: "misc", documentation: {description: "Lists all additional keywords the bot reacts to.", example: "misc"} })
|
|
|
async showMisc(msg: Message) {
|
|
|
await this.listGuides(msg, "misc", "These are some misc stuff I can also do:")
|
|
|
}
|