This commit is contained in:
DjDeveloperr 2021-03-30 17:45:38 +05:30
parent 95145c1bc2
commit 82431168d3

View file

@ -89,7 +89,7 @@ export function handle(
const parts = handle.name.split(/ +/).filter(e => e !== '')
if (parts.length > 3 || parts.length < 1) throw new Error('Invalid command name')
const root = parts.shift() as string
const group = parts.length === 3 ? parts.shift() : undefined
const group = parts.length === 2 ? parts.shift() : undefined
const sub = parts.shift()
handle.name = sub ?? root