mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
test
This commit is contained in:
parent
3c36c2b7c1
commit
f983eca8ae
@ -121,10 +121,7 @@ def prerun_query(t_command_type='module', t_command_subtype=None):
|
|||||||
trigger_command_type = str(t_command_type)
|
trigger_command_type = str(t_command_type)
|
||||||
|
|
||||||
# Primary command used for trigger, and a list of all words
|
# Primary command used for trigger, and a list of all words
|
||||||
prefixnick = False
|
trigger_args, trigger_command, trigger_prefix = make_trigger_args(trigger.args[1], trigger_command_type)
|
||||||
if t_command_type == "nickname":
|
|
||||||
prefixnick = True
|
|
||||||
trigger_args, trigger_command, trigger_prefix = make_trigger_args(trigger.args[1], trigger_command_type, prefixnick)
|
|
||||||
|
|
||||||
if trigger_prefix != botconfig.SpiceBot_Commands.query_prefix:
|
if trigger_prefix != botconfig.SpiceBot_Commands.query_prefix:
|
||||||
return
|
return
|
||||||
@ -174,16 +171,13 @@ def prerun_query(t_command_type='module', t_command_subtype=None):
|
|||||||
return actual_decorator
|
return actual_decorator
|
||||||
|
|
||||||
|
|
||||||
def make_trigger_args(triggerargs_one, trigger_command_type='module', prefixnick=False):
|
def make_trigger_args(triggerargs_one, trigger_command_type='module'):
|
||||||
trigger_args = spicemanip.main(triggerargs_one, 'create')
|
trigger_args = spicemanip.main(triggerargs_one, 'create')
|
||||||
if trigger_command_type in ['nickname']:
|
if trigger_command_type in ['nickname']:
|
||||||
trigger_prefix = spicemanip.main(trigger_args, 2).lower()[0]
|
trigger_prefix = spicemanip.main(trigger_args, 2).lower()[0]
|
||||||
if trigger_prefix.isupper() or trigger_prefix.islower():
|
if trigger_prefix.isupper() or trigger_prefix.islower():
|
||||||
trigger_prefix = None
|
trigger_prefix = None
|
||||||
if not prefixnick:
|
|
||||||
trigger_command = spicemanip.main(trigger_args, 2).lower()
|
trigger_command = spicemanip.main(trigger_args, 2).lower()
|
||||||
else:
|
|
||||||
trigger_command = spicemanip.main(trigger_args, 2).lower()[1:]
|
|
||||||
trigger_args = spicemanip.main(trigger_args, '3+', 'list')
|
trigger_args = spicemanip.main(trigger_args, '3+', 'list')
|
||||||
else:
|
else:
|
||||||
trigger_prefix = spicemanip.main(trigger_args, 1).lower()[0]
|
trigger_prefix = spicemanip.main(trigger_args, 1).lower()[0]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user