mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
fix import as
This commit is contained in:
parent
3bf05b9fce
commit
5a744a1f3f
@ -12,7 +12,7 @@ import datetime
|
|||||||
import spicemanip
|
import spicemanip
|
||||||
|
|
||||||
from .Tools import command_permissions_check
|
from .Tools import command_permissions_check
|
||||||
from .Commands import commands
|
from .Commands import commands as botcommands
|
||||||
from .Database import db as botdb
|
from .Database import db as botdb
|
||||||
|
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ class BotPrerun():
|
|||||||
argsdict_default["type"] = trigger_command_type
|
argsdict_default["type"] = trigger_command_type
|
||||||
argsdict_default["com"] = trigger_command
|
argsdict_default["com"] = trigger_command
|
||||||
|
|
||||||
realcom = commands.get_realcom(argsdict_default["com"], trigger_command_type)
|
realcom = botcommands.get_realcom(argsdict_default["com"], trigger_command_type)
|
||||||
argsdict_default["realcom"] = realcom
|
argsdict_default["realcom"] = realcom
|
||||||
|
|
||||||
# split into && groupings
|
# split into && groupings
|
||||||
@ -161,11 +161,11 @@ class BotPrerun():
|
|||||||
bot.osd("This command must be run in a channel you which to enable it in.", trigger.nick, 'notice')
|
bot.osd("This command must be run in a channel you which to enable it in.", trigger.nick, 'notice')
|
||||||
return
|
return
|
||||||
|
|
||||||
if not commands.check_commands_disabled(trigger.sb["realcom"], trigger.sender):
|
if not botcommands.check_commands_disabled(trigger.sb["realcom"], trigger.sender):
|
||||||
bot.osd(trigger.sb["com"] + " is already enabled in " + str(trigger.sender), trigger.nick, 'notice')
|
bot.osd(trigger.sb["com"] + " is already enabled in " + str(trigger.sender), trigger.nick, 'notice')
|
||||||
return
|
return
|
||||||
|
|
||||||
commands.unset_command_disabled(trigger.sb["realcom"], trigger.sender)
|
botcommands.unset_command_disabled(trigger.sb["realcom"], trigger.sender)
|
||||||
bot.osd(trigger.sb["com"] + " is now enabled in " + str(trigger.sender))
|
bot.osd(trigger.sb["com"] + " is now enabled in " + str(trigger.sender))
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -179,14 +179,14 @@ class BotPrerun():
|
|||||||
bot.osd("This command must be run in a channel you which to disable it in.", trigger.nick, 'notice')
|
bot.osd("This command must be run in a channel you which to disable it in.", trigger.nick, 'notice')
|
||||||
return
|
return
|
||||||
|
|
||||||
if commands.check_commands_disabled(trigger.sb["realcom"], trigger.sender):
|
if botcommands.check_commands_disabled(trigger.sb["realcom"], trigger.sender):
|
||||||
bot.osd(trigger.sb["com"] + " is already disabled in " + str(trigger.sender), trigger.nick, 'notice')
|
bot.osd(trigger.sb["com"] + " is already disabled in " + str(trigger.sender), trigger.nick, 'notice')
|
||||||
return
|
return
|
||||||
|
|
||||||
trailingmessage = spicemanip.main(trigger.sb["args"], 0) or "No reason given."
|
trailingmessage = spicemanip.main(trigger.sb["args"], 0) or "No reason given."
|
||||||
timestamp = str(datetime.datetime.utcnow())
|
timestamp = str(datetime.datetime.utcnow())
|
||||||
|
|
||||||
commands.set_command_disabled(trigger.sb["realcom"], trigger.sender, timestamp, trailingmessage, trigger.nick)
|
botcommands.set_command_disabled(trigger.sb["realcom"], trigger.sender, timestamp, trailingmessage, trigger.nick)
|
||||||
bot.osd(trigger.sb["com"] + " is now disabled in " + str(trigger.sender))
|
bot.osd(trigger.sb["com"] + " is now disabled in " + str(trigger.sender))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user