mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 22:49:53 -05:00
--check
This commit is contained in:
parent
20eea8f664
commit
e9a9c236cb
@ -55,14 +55,12 @@ class BotPrerun():
|
|||||||
for argsdict in argsdict_list:
|
for argsdict in argsdict_list:
|
||||||
trigger.sb = argsdict
|
trigger.sb = argsdict
|
||||||
trigger.sb["args"], trigger.sb["hyphen_arg"] = self.trigger_hyphen_args(trigger.sb["args"])
|
trigger.sb["args"], trigger.sb["hyphen_arg"] = self.trigger_hyphen_args(trigger.sb["args"])
|
||||||
# if trigger.sb["hyphen_arg"]:
|
if not trigger.sb["hyphen_arg"]:
|
||||||
# self.trigger_hyphen_arg_handler(bot, trigger)
|
# check if anything prohibits the nick from running the command
|
||||||
# else:
|
if self.trigger_runstatus(bot, trigger, argsdict):
|
||||||
# # check if anything prohibits the nick from running the command
|
function(bot, trigger, *args, **kwargs)
|
||||||
# if self.trigger_runstatus(bot, trigger, argsdict):
|
else:
|
||||||
# function(bot, trigger, *args, **kwargs)
|
self.trigger_hyphen_arg_handler(bot, trigger)
|
||||||
if self.trigger_runstatus(bot, trigger, argsdict):
|
|
||||||
function(bot, trigger, *args, **kwargs)
|
|
||||||
return
|
return
|
||||||
return internal_prerun
|
return internal_prerun
|
||||||
return actual_decorator
|
return actual_decorator
|
||||||
@ -113,7 +111,14 @@ class BotPrerun():
|
|||||||
def trigger_hyphen_arg_handler(self, bot, trigger):
|
def trigger_hyphen_arg_handler(self, bot, trigger):
|
||||||
|
|
||||||
# Commands that cannot run via privmsg
|
# Commands that cannot run via privmsg
|
||||||
if trigger.sb["hyphen_arg"] in ['enable']:
|
if trigger.sb["hyphen_arg"] in ['check']:
|
||||||
|
if trigger.sb["com"].lower() != trigger.sb["realcom"]:
|
||||||
|
bot.say(trigger.sb["com"] + " is a valid alias command for " + trigger.sb["realcom"])
|
||||||
|
else:
|
||||||
|
bot.say(trigger.sb["com"] + " is a valid command")
|
||||||
|
return
|
||||||
|
|
||||||
|
elif trigger.sb["hyphen_arg"] in ['enable']:
|
||||||
|
|
||||||
if not command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
if not command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
||||||
bot.say("I was unable to disable this command due to privilege issues.")
|
bot.say("I was unable to disable this command due to privilege issues.")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user