[Plugins/Command] Awful hack to allow setting type
of args
Oh boy, here I go evaling user-defined strings again
This commit is contained in:
parent
238aa24a23
commit
b69e808763
1 changed files with 2 additions and 0 deletions
|
@ -114,6 +114,8 @@ class CommandPlugin(PluginBase):
|
|||
cmd = Command(name, help, aliases=aliases)
|
||||
|
||||
for argnode in [node for node in _children if node.name == 'arg']:
|
||||
if argnode.props.get('type'):
|
||||
argnode.props['type'] = eval(argnode.props['type'])
|
||||
cmd.add_arg(*argnode.args, **argnode.props)
|
||||
|
||||
self.commands[name] = (cmd, actionnode, display)
|
||||
|
|
Loading…
Add table
Reference in a new issue