From e98d0e9e719988c46a2765e7622407637adbe7f1 Mon Sep 17 00:00:00 2001 From: Yusu Date: Tue, 26 Dec 2023 16:33:30 +0100 Subject: [PATCH 1/3] Added !winter command --- src/commands/chatters/winter.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/commands/chatters/winter.ts diff --git a/src/commands/chatters/winter.ts b/src/commands/chatters/winter.ts new file mode 100644 index 0000000..0594ce6 --- /dev/null +++ b/src/commands/chatters/winter.ts @@ -0,0 +1,22 @@ +import { Discord, SimpleCommand, SimpleCommandMessage, SimpleCommandOption, SimpleCommandOptionType } from 'discordx' + +@Discord() +class Winter { + @SimpleCommand({ name: 'winter', description: 'Winter', prefix: '!', argSplitter: '\n' }) + async simple( + @SimpleCommandOption({ name: 'text', type: SimpleCommandOptionType.String }) text: string | undefined, + command: SimpleCommandMessage + ) { + let content + if (text !== undefined) { + content = `${text}? Estrogen can help with that` + } else { + content = 'Estrogen can help with that' + } + + await command.message.channel.send({ + content: content, + }) + return + } +} From 45ede06bea9d2e7987b5088ff766ad6c98ec3aa3 Mon Sep 17 00:00:00 2001 From: Yusu Date: Fri, 29 Dec 2023 10:54:59 +0100 Subject: [PATCH 2/3] Changed command prefix back to the default one --- src/commands/chatters/winter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/chatters/winter.ts b/src/commands/chatters/winter.ts index 0594ce6..43f1308 100644 --- a/src/commands/chatters/winter.ts +++ b/src/commands/chatters/winter.ts @@ -2,7 +2,7 @@ import { Discord, SimpleCommand, SimpleCommandMessage, SimpleCommandOption, Simp @Discord() class Winter { - @SimpleCommand({ name: 'winter', description: 'Winter', prefix: '!', argSplitter: '\n' }) + @SimpleCommand({ name: 'winter', description: 'Winter', argSplitter: '\n' }) async simple( @SimpleCommandOption({ name: 'text', type: SimpleCommandOptionType.String }) text: string | undefined, command: SimpleCommandMessage From bf520e6722c2d13079b66d4e82813b6268330906 Mon Sep 17 00:00:00 2001 From: yusu-banana <130826639+yusu-banana@users.noreply.github.com> Date: Tue, 2 Jan 2024 18:30:54 +0100 Subject: [PATCH 3/3] Update src/commands/chatters/winter.ts Co-authored-by: Jordon Shields --- src/commands/chatters/winter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/chatters/winter.ts b/src/commands/chatters/winter.ts index 43f1308..d48dae8 100644 --- a/src/commands/chatters/winter.ts +++ b/src/commands/chatters/winter.ts @@ -8,7 +8,7 @@ class Winter { command: SimpleCommandMessage ) { let content - if (text !== undefined) { + if (text) { content = `${text}? Estrogen can help with that` } else { content = 'Estrogen can help with that'