diff --git a/deps.ts b/deps.ts index 91097fc..e20a610 100644 --- a/deps.ts +++ b/deps.ts @@ -1,7 +1,6 @@ export { EventEmitter } from 'https://deno.land/x/event@0.2.1/mod.ts' export { unzlib } from 'https://denopkg.com/DjDeveloperr/denoflate@1.2/mod.ts' export { fetchAuto } from 'https://deno.land/x/fetchbase64@1.0.0/mod.ts' -export { parse } from 'https://deno.land/x/mutil@0.1.2/mod.ts' export { connect } from 'https://deno.land/x/redis@v0.14.1/mod.ts' export type { Redis, diff --git a/src/models/command.ts b/src/models/command.ts index 4040449..ee24145 100644 --- a/src/models/command.ts +++ b/src/models/command.ts @@ -5,7 +5,7 @@ import { User } from '../structures/user.ts' import { Collection } from '../utils/collection.ts' import { CommandClient } from './commandClient.ts' import { Extension } from './extensions.ts' -import { join, parse, walk } from '../../deps.ts' +import { join, walk } from '../../deps.ts' export interface CommandContext { /** The Client object */ @@ -599,7 +599,7 @@ export const parseCommand = ( ): ParsedCommand | undefined => { let content = msg.content.slice(prefix.length) if (client.spacesAfterPrefix === true) content = content.trim() - const args = parse(content)._.map((e) => e.toString()) + const args = content.split(' ') const name = args.shift() if (name === undefined) return diff --git a/src/test/cmd.ts b/src/test/cmd.ts index 5063198..4798c36 100644 --- a/src/test/cmd.ts +++ b/src/test/cmd.ts @@ -139,7 +139,7 @@ client.on('messageReactionRemoveAll', (message) => { // client.on('raw', (evt: string) => console.log(`EVENT: ${evt}`)) -const files = Deno.readDirSync('./src/test/cmds') +const files = Deno.readDirSync('cmds') for (const file of files) { const module = await import(`./cmds/${file.name}`) diff --git a/src/test/cmds/ping.ts b/src/test/cmds/ping.ts index 61981ae..3f0c381 100644 --- a/src/test/cmds/ping.ts +++ b/src/test/cmds/ping.ts @@ -5,6 +5,7 @@ export default class PingCommand extends Command { name = 'ping' execute(ctx: CommandContext): void { + console.log(ctx.args, ctx.argString) ctx.message.reply(`Pong! Latency: ${ctx.client.ping}ms`) } }