Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit 7571ee8c86c2e9ca81717d7a0991097252f5596b
parent 72367c0f8973fb21dc22e1f9eff7db56e9042d93
Author: Bruno <b-coimbra@hotmail.com>
Date:   Wed, 20 May 2020 20:50:44 -0300

remove inferior kode

Diffstat:
Dlib/commands/sourcecode.ts | 20--------------------
1 file changed, 0 insertions(+), 20 deletions(-)

diff --git a/lib/commands/sourcecode.ts b/lib/commands/sourcecode.ts @@ -1,20 +0,0 @@ -import { FORMATS } from '../extensions'; -import { Message } from 'discord.js'; - -import { readFileSync as read_file } from 'fs'; - -export default (home_scope: HomeScope) => { - const { message, args } - : { message: Message, args: string[] } = home_scope; - - if (args.length == 0) { - return message.channel.send( - "View a command's source code.\n.sourcecode [!command]" - ); - } - - const command_name = args[0].replace(/^\.|\.ts/, ''); - const src = read_file(`./${command_name}.ts`).toString(); - - message.channel.send(src.format(FORMATS.code_block, 'ts')); -};