mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 08:41:39 +01:00
10 lines
318 B
TypeScript
10 lines
318 B
TypeScript
import { commandPrefix } from "..";
|
|
|
|
/** Helper function to extract arguments from commands */
|
|
export default function parseCommandArgs(input: string) {
|
|
const a = input.slice(commandPrefix.length);
|
|
const sliceLength = a.startsWith('use') ? 2 : 1;
|
|
const b = a.trim().split(' ').slice(sliceLength);
|
|
return b;
|
|
};
|