mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
ai command
This commit is contained in:
parent
adc9b8d300
commit
c287f728cf
@ -191,7 +191,7 @@ def trigger_runstatus(bot, trigger):
|
||||
return trigger_cant_run(bot, trigger, message)
|
||||
else:
|
||||
botcommands.unset_command_disabled(trigger.sb["realcom"], trigger.nick, "fully")
|
||||
botmessagelog.messagelog_error(trigger.sb["log_id"], trigger.sb["comtext"] + " multirun is now enabled for " + str(trigger.nick))
|
||||
botmessagelog.messagelog(trigger.sb["log_id"], trigger.sb["comtext"] + " is now enabled for " + str(trigger.nick))
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@ -9,9 +9,26 @@ import sopel_modules.SpiceBot as SpiceBot
|
||||
import spicemanip
|
||||
|
||||
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('ai')
|
||||
def ai_trigger(bot, trigger):
|
||||
bot.osd("I have the capability of responding to many requests, but I am not YET sentient.")
|
||||
|
||||
|
||||
@sopel.module.rule('(.*)')
|
||||
def bot_command_rule_ai(bot, trigger):
|
||||
|
||||
# don't run commands that are disabled in channels
|
||||
if not trigger.is_privmsg:
|
||||
channel_disabled_list = SpiceBot.commands.get_commands_disabled(str(trigger.sender), "fully")
|
||||
if "ai" in list(channel_disabled_list.keys()):
|
||||
return
|
||||
|
||||
# don't run commands that are disabled for specific users
|
||||
nick_disabled_list = SpiceBot.commands.get_commands_disabled(str(trigger.nick), "fully")
|
||||
if "ai" in list(nick_disabled_list.keys()):
|
||||
return
|
||||
|
||||
# TODO add config limits
|
||||
# but still allow in privmsg
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user