mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 14:39:54 -05:00
first messagelog test
This commit is contained in:
parent
8bbfbf4bd6
commit
fca8bb4fb5
138
sopel_modules/SpiceBot/MessageLog.py
Normal file
138
sopel_modules/SpiceBot/MessageLog.py
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
# coding=utf8
|
||||||
|
from __future__ import unicode_literals, absolute_import, division, print_function
|
||||||
|
"""
|
||||||
|
This is the SpiceBot Message Log system.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
|
class MessageLog():
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.dict = {}
|
||||||
|
self.message_display = dict()
|
||||||
|
self.used_ids = [0]
|
||||||
|
self.error_message_dict = {
|
||||||
|
"command_inchan_only": "$command must be run in channel.",
|
||||||
|
"admin_switch_unauth": "The admin switch (-a) is for use by authorized nicks ONLY.",
|
||||||
|
}
|
||||||
|
|
||||||
|
def messagelog_assign(self):
|
||||||
|
unique_id = 0
|
||||||
|
while unique_id in self.used_ids:
|
||||||
|
unique_id = uuid.uuid4()
|
||||||
|
self.used_ids.append(unique_id)
|
||||||
|
return unique_id
|
||||||
|
|
||||||
|
def messagelog_start(self, bot, trigger, log_id):
|
||||||
|
|
||||||
|
if not trigger.is_privmsg:
|
||||||
|
channelname = None
|
||||||
|
else:
|
||||||
|
channelname = trigger.sender
|
||||||
|
|
||||||
|
self.message_display[log_id] = {
|
||||||
|
"trigger": {
|
||||||
|
"nick": trigger.nick,
|
||||||
|
"sender": channelname,
|
||||||
|
},
|
||||||
|
"bot": {
|
||||||
|
"nick": bot.nick
|
||||||
|
},
|
||||||
|
"messages": [],
|
||||||
|
}
|
||||||
|
|
||||||
|
def messagelog_error(self, log_id, error_id):
|
||||||
|
|
||||||
|
newloglist = []
|
||||||
|
error_exists_prior = False
|
||||||
|
|
||||||
|
for existing_messagedict in self.message_display[log_id]["messages"]:
|
||||||
|
if existing_messagedict["type"] == "error":
|
||||||
|
if existing_messagedict["error_id"] == error_id:
|
||||||
|
error_exists_prior = True
|
||||||
|
existing_messagedict["count"] += 1
|
||||||
|
newloglist.append(existing_messagedict)
|
||||||
|
|
||||||
|
if not error_exists_prior:
|
||||||
|
newmessagedict = {"type": "error", "error_id": error_id, "count": 1}
|
||||||
|
newloglist.append(newmessagedict)
|
||||||
|
|
||||||
|
self.message_display[log_id]["messages"] = newloglist
|
||||||
|
|
||||||
|
def messagelog(self, log_id, message, recipients=None):
|
||||||
|
|
||||||
|
if not recipients:
|
||||||
|
if self.message_display[log_id]["trigger"]["sender"]:
|
||||||
|
recipients = self.message_display[log_id]["trigger"]["sender"]
|
||||||
|
else:
|
||||||
|
recipients = self.message_display[log_id]["trigger"]["nick"]
|
||||||
|
|
||||||
|
messagedict = {"type": "normal", "message": message, "recipients": recipients}
|
||||||
|
|
||||||
|
self.message_display[log_id]["messages"].append(messagedict)
|
||||||
|
|
||||||
|
def messagelog_exit(self, bot, log_id):
|
||||||
|
|
||||||
|
current_messages = []
|
||||||
|
current_errors = []
|
||||||
|
|
||||||
|
for messagedict in self.message_display[log_id]["messages"]:
|
||||||
|
|
||||||
|
if messagedict["type"] == "error":
|
||||||
|
if messagedict["error_id"] not in self.error_message_dict.keys():
|
||||||
|
message = "Error missing for ID '" + str(messagedict["error_id"]) + "'"
|
||||||
|
else:
|
||||||
|
message = self.error_message_dict[messagedict["error_id"]]
|
||||||
|
message += " (" + str(messagedict["count"]) + ")"
|
||||||
|
message = self.messagelog_fillin(bot, message, log_id)
|
||||||
|
current_errors.append(message)
|
||||||
|
else:
|
||||||
|
if len(current_errors):
|
||||||
|
currenterrordict = {"type": "error", "message": current_errors}
|
||||||
|
current_messages.append(currenterrordict)
|
||||||
|
current_errors = []
|
||||||
|
message = messagedict["message"]
|
||||||
|
current_messages.append(messagedict)
|
||||||
|
if len(current_errors):
|
||||||
|
currenterrordict = {"type": "error", "message": current_errors}
|
||||||
|
current_messages.append(currenterrordict)
|
||||||
|
current_errors = []
|
||||||
|
|
||||||
|
for messagedict in current_messages:
|
||||||
|
if messagedict["type"] == 'error':
|
||||||
|
bot.osd(messagedict['message'], self.message_display[log_id]["trigger"]["nick"], 'notice')
|
||||||
|
else:
|
||||||
|
bot.osd(messagedict['message'], messagedict["recipients"], 'say')
|
||||||
|
|
||||||
|
self.messagelog_kill(log_id)
|
||||||
|
|
||||||
|
def messagelog_fillin(self, message, log_id):
|
||||||
|
|
||||||
|
for botval in ["nick"]:
|
||||||
|
fullbotval = str("$bot." + botval)
|
||||||
|
fullbotvaleval = self.message_display[log_id]["bot"][botval]
|
||||||
|
if fullbotval in message:
|
||||||
|
message = str(message.replace(fullbotval, fullbotvaleval))
|
||||||
|
|
||||||
|
for triggerval in ["nick", "sender"]:
|
||||||
|
fulltriggerval = str("$trigger." + triggerval)
|
||||||
|
fulltriggervaleval = self.message_display[log_id]["trigger"][triggerval]
|
||||||
|
if fulltriggerval in message:
|
||||||
|
if fulltriggervaleval:
|
||||||
|
message = str(message.replace(fulltriggerval, fulltriggervaleval))
|
||||||
|
else:
|
||||||
|
if triggerval == "sender":
|
||||||
|
message = str(message.replace("$trigger.sender", 'privmsg'))
|
||||||
|
else:
|
||||||
|
message = str(message.replace(fulltriggerval, str(fulltriggervaleval)))
|
||||||
|
|
||||||
|
return message
|
||||||
|
|
||||||
|
def messagelog_kill(self, log_id):
|
||||||
|
if log_id in self.message_display:
|
||||||
|
del self.message_display[log_id]
|
||||||
|
|
||||||
|
|
||||||
|
messagelog = MessageLog()
|
||||||
@ -16,6 +16,7 @@ from .Tools import command_permissions_check
|
|||||||
from .Commands import commands as botcommands
|
from .Commands import commands as botcommands
|
||||||
from .Database import db as botdb
|
from .Database import db as botdb
|
||||||
from .Channels import channels as botchannels
|
from .Channels import channels as botchannels
|
||||||
|
from .MessageLog import messagelog as botmessagelog
|
||||||
|
|
||||||
|
|
||||||
def prerun(t_command_type='module', t_command_subtype=None):
|
def prerun(t_command_type='module', t_command_subtype=None):
|
||||||
@ -43,6 +44,9 @@ def prerun(t_command_type='module', t_command_subtype=None):
|
|||||||
argsdict_default["type"] = trigger_command_type
|
argsdict_default["type"] = trigger_command_type
|
||||||
argsdict_default["com"] = trigger_command
|
argsdict_default["com"] = trigger_command
|
||||||
|
|
||||||
|
# messagelog ID
|
||||||
|
argsdict_default["log_id"] = botmessagelog.messagelog_assign()
|
||||||
|
|
||||||
realcom = botcommands.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
|
||||||
|
|
||||||
@ -53,6 +57,7 @@ def prerun(t_command_type='module', t_command_subtype=None):
|
|||||||
argsdict_list = trigger_argsdict_list(argsdict_default, and_split)
|
argsdict_list = trigger_argsdict_list(argsdict_default, and_split)
|
||||||
|
|
||||||
# Run the function for all splits
|
# Run the function for all splits
|
||||||
|
botmessagelog.messagelog_start(bot, trigger, argsdict_default["log_id"])
|
||||||
runcount = 0
|
runcount = 0
|
||||||
for argsdict in argsdict_list:
|
for argsdict in argsdict_list:
|
||||||
runcount += 1
|
runcount += 1
|
||||||
@ -67,6 +72,7 @@ def prerun(t_command_type='module', t_command_subtype=None):
|
|||||||
function(bot, trigger, *args, **kwargs)
|
function(bot, trigger, *args, **kwargs)
|
||||||
else:
|
else:
|
||||||
trigger_hyphen_arg_handler(bot, trigger)
|
trigger_hyphen_arg_handler(bot, trigger)
|
||||||
|
botmessagelog.messagelog_exit(bot, argsdict_default["log_id"])
|
||||||
|
|
||||||
return internal_prerun
|
return internal_prerun
|
||||||
return actual_decorator
|
return actual_decorator
|
||||||
@ -126,7 +132,7 @@ def trigger_runstatus(bot, trigger):
|
|||||||
if command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
if command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
bot.osd("The admin switch (-a) is for use by authorized nicks ONLY.", 'notice')
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "The admin switch (-a) is for use by authorized nicks ONLY.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if trigger.sb["hyphen_arg"]:
|
if trigger.sb["hyphen_arg"]:
|
||||||
@ -176,9 +182,9 @@ def trigger_runstatus(bot, trigger):
|
|||||||
|
|
||||||
def trigger_cant_run(bot, trigger, message=None):
|
def trigger_cant_run(bot, trigger, message=None):
|
||||||
if message:
|
if message:
|
||||||
bot.osd(message, trigger.nick, 'notice')
|
botmessagelog.messagelog_error(trigger.sb["log_id"], message)
|
||||||
if command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
if command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
||||||
bot.osd("You however are authorized to bypass this warning with the (-a) admin switch.", trigger.nick, 'notice')
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "You however are authorized to bypass this warning with the (-a) admin switch.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@ -206,9 +212,9 @@ def trigger_hyphen_arg_handler(bot, trigger):
|
|||||||
# Commands that cannot run via privmsg
|
# Commands that cannot run via privmsg
|
||||||
if trigger.sb["hyphen_arg"] in ['check']:
|
if trigger.sb["hyphen_arg"] in ['check']:
|
||||||
if trigger.sb["com"].lower() != trigger.sb["realcom"]:
|
if trigger.sb["com"].lower() != trigger.sb["realcom"]:
|
||||||
bot.osd(trigger.sb["com"] + " is a valid alias command for " + trigger.sb["realcom"])
|
botmessagelog.messagelog(trigger.sb["log_id"], trigger.sb["com"] + " is a valid alias command for " + trigger.sb["realcom"])
|
||||||
else:
|
else:
|
||||||
bot.osd(trigger.sb["com"] + " is a valid command")
|
botmessagelog.messagelog(trigger.sb["log_id"], trigger.sb["com"] + " is a valid command")
|
||||||
return
|
return
|
||||||
elif trigger.sb["hyphen_arg"] in [
|
elif trigger.sb["hyphen_arg"] in [
|
||||||
'enable', 'disable',
|
'enable', 'disable',
|
||||||
@ -220,92 +226,116 @@ def trigger_hyphen_arg_handler(bot, trigger):
|
|||||||
target = spicemanip.main(trigger.sb["args"], 1) or None
|
target = spicemanip.main(trigger.sb["args"], 1) or None
|
||||||
if not target:
|
if not target:
|
||||||
if trigger.sb["hyphen_arg"] in ['enable', 'unblock', "activate", "on"]:
|
if trigger.sb["hyphen_arg"] in ['enable', 'unblock', "activate", "on"]:
|
||||||
bot.osd("Who/Where am I enabling " + str(trigger.sb["realcom"]) + " usage for?", trigger.sender)
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "Who/Where am I enabling " + str(trigger.sb["realcom"]) + " usage for?")
|
||||||
else:
|
else:
|
||||||
bot.osd("Who/Where am I disabling " + str(trigger.sb["realcom"]) + " usage for?", trigger.sender)
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "Who/Where am I disabling " + str(trigger.sb["realcom"]) + " usage for?")
|
||||||
return
|
return
|
||||||
|
|
||||||
if not botdb.check_nick_id(target) and not botchannels.check_channel_bot(target, True):
|
if not botdb.check_nick_id(target) and not botchannels.check_channel_bot(target, True):
|
||||||
bot.osd("I don't know who/what " + str(target) + " is.", trigger.sender)
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "I don't know who/what " + str(target) + " is.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if not command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
if not command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
||||||
if trigger.sb["hyphen_arg"] in ['enable', 'unblock', "activate", "on"]:
|
if trigger.sb["hyphen_arg"] in ['enable', 'unblock', "activate", "on"]:
|
||||||
bot.osd("I was unable to enable this command for " + str(target) + " due to privilege issues.")
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "I was unable to enable this command for " + str(target) + " due to privilege issues.")
|
||||||
else:
|
else:
|
||||||
bot.osd("I was unable to disable this command for " + str(target) + " due to privilege issues.")
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "I was unable to disable this command for " + str(target) + " due to privilege issues.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if trigger.sb["hyphen_arg"] in ['enable', 'unblock', "activate", "on"]:
|
if trigger.sb["hyphen_arg"] in ['enable', 'unblock', "activate", "on"]:
|
||||||
|
|
||||||
if not botcommands.check_commands_disabled(trigger.sb["realcom"], target, "fully"):
|
if not botcommands.check_commands_disabled(trigger.sb["realcom"], target, "fully"):
|
||||||
bot.osd(trigger.sb["com"] + " is already enabled for " + str(target), trigger.nick, 'notice')
|
botmessagelog.messagelog_error(trigger.sb["log_id"], trigger.sb["com"] + " is already enabled for " + str(target))
|
||||||
return
|
return
|
||||||
|
|
||||||
botcommands.unset_command_disabled(trigger.sb["realcom"], target, "fully")
|
botcommands.unset_command_disabled(trigger.sb["realcom"], target, "fully")
|
||||||
bot.osd(trigger.sb["com"] + " is now enabled for " + str(target))
|
botmessagelog.messagelog(trigger.sb["log_id"], trigger.sb["com"] + " is now enabled for " + str(target))
|
||||||
return
|
return
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
if botcommands.check_commands_disabled(trigger.sb["realcom"], target, "fully"):
|
if botcommands.check_commands_disabled(trigger.sb["realcom"], target, "fully"):
|
||||||
bot.osd(trigger.sb["com"] + " is already disabled for " + str(target), trigger.nick, 'notice')
|
botmessagelog.messagelog_error(trigger.sb["log_id"], trigger.sb["com"] + " is already disabled for " + str(target))
|
||||||
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())
|
||||||
|
|
||||||
botcommands.set_command_disabled(trigger.sb["realcom"], target, timestamp, trailingmessage, trigger.nick, "fully")
|
botcommands.set_command_disabled(trigger.sb["realcom"], target, timestamp, trailingmessage, trigger.nick, "fully")
|
||||||
bot.osd(trigger.sb["com"] + " is now disabled for " + str(target))
|
botmessagelog.messagelog(trigger.sb["log_id"], trigger.sb["com"] + " is now disabled for " + str(target))
|
||||||
return
|
return
|
||||||
|
|
||||||
if trigger.sb["hyphen_arg"] in ['multirun', 'multiruns']:
|
if trigger.sb["hyphen_arg"] in ['multirun', 'multiruns']:
|
||||||
|
|
||||||
onoff = spicemanip.main(trigger.sb["args"], 1) or None
|
onoff = spicemanip.main(trigger.sb["args"], 1) or None
|
||||||
if not onoff or onoff not in ['enable', 'unblock', "activate", "on"]:
|
if not onoff or onoff not in ['enable', 'unblock', "activate", "on"]:
|
||||||
bot.osd("Do you want to enable or disable " + str(trigger.sb["realcom"]) + " multirun usage?", trigger.sender)
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "Do you want to enable or disable " + str(trigger.sb["realcom"]) + " multirun usage?")
|
||||||
return
|
return
|
||||||
|
|
||||||
target = spicemanip.main(trigger.sb["args"], 1) or None
|
target = spicemanip.main(trigger.sb["args"], 1) or None
|
||||||
if not target:
|
if not target:
|
||||||
if onoff in ['enable', 'unblock', "activate", "on"]:
|
if onoff in ['enable', 'unblock', "activate", "on"]:
|
||||||
bot.osd("Who/Where am I enabling " + str(trigger.sb["realcom"]) + " multirun usage for?", trigger.sender)
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "Who/Where am I enabling " + str(trigger.sb["realcom"]) + " multirun usage for?")
|
||||||
else:
|
else:
|
||||||
bot.osd("Who/Where am I disabling " + str(trigger.sb["realcom"]) + " multirun usage for?", trigger.sender)
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "Who/Where am I disabling " + str(trigger.sb["realcom"]) + " multirun usage for?")
|
||||||
return
|
return
|
||||||
|
|
||||||
if not botdb.check_nick_id(target) and not botchannels.check_channel_bot(target, True):
|
if not botdb.check_nick_id(target) and not botchannels.check_channel_bot(target, True):
|
||||||
bot.osd("I don't know who/what " + str(target) + " is.", trigger.sender)
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "I don't know who/what " + str(target) + " is.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if not command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
if not command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):
|
||||||
if onoff in ['enable', 'unblock', "activate", "on"]:
|
if onoff in ['enable', 'unblock', "activate", "on"]:
|
||||||
bot.osd("I was unable to enable multirun usage on " + str(trigger.sb["realcom"]) + " for " + str(target) + " due to privilege issues.")
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "I was unable to enable multirun usage on " + str(trigger.sb["realcom"]) + " for " + str(target) + " due to privilege issues.")
|
||||||
else:
|
else:
|
||||||
bot.osd("I was unable to enable multirun usage on " + str(trigger.sb["realcom"]) + " for " + str(target) + " due to privilege issues.")
|
botmessagelog.messagelog_error(trigger.sb["log_id"], "I was unable to enable multirun usage on " + str(trigger.sb["realcom"]) + " for " + str(target) + " due to privilege issues.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if onoff in ['enable', 'unblock', "activate", "on"]:
|
if onoff in ['enable', 'unblock', "activate", "on"]:
|
||||||
|
|
||||||
if not botcommands.check_commands_disabled(trigger.sb["realcom"], target, "multirun"):
|
if not botcommands.check_commands_disabled(trigger.sb["realcom"], target, "multirun"):
|
||||||
bot.osd(trigger.sb["com"] + " multirun is already enabled for " + str(target), trigger.nick, 'notice')
|
botmessagelog.messagelog_error(trigger.sb["log_id"], trigger.sb["com"] + " multirun is already enabled for " + str(target))
|
||||||
return
|
return
|
||||||
|
|
||||||
botcommands.unset_command_disabled(trigger.sb["realcom"], target, "multirun")
|
botcommands.unset_command_disabled(trigger.sb["realcom"], target, "multirun")
|
||||||
bot.osd(trigger.sb["com"] + " multirun is now enabled for " + str(target))
|
botmessagelog.messagelog(trigger.sb["log_id"], trigger.sb["com"] + " multirun is now enabled for " + str(target))
|
||||||
return
|
return
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
if botcommands.check_commands_disabled(trigger.sb["realcom"], target, "multirun"):
|
if botcommands.check_commands_disabled(trigger.sb["realcom"], target, "multirun"):
|
||||||
bot.osd(trigger.sb["com"] + " multirun is already disabled for " + str(target), trigger.nick, 'notice')
|
botmessagelog.messagelog_error(trigger.sb["log_id"], trigger.sb["com"] + " multirun is already disabled for " + str(target))
|
||||||
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())
|
||||||
|
|
||||||
botcommands.set_command_disabled(trigger.sb["realcom"], target, timestamp, trailingmessage, trigger.nick, "multirun")
|
botcommands.set_command_disabled(trigger.sb["realcom"], target, timestamp, trailingmessage, trigger.nick, "multirun")
|
||||||
bot.osd(trigger.sb["com"] + " multirun is now disabled for " + str(target))
|
botmessagelog.messagelog(trigger.sb["log_id"], trigger.sb["com"] + " multirun is now disabled for " + str(target))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
elif trigger.sb["hyphen_arg"] in ['example', 'usage']:
|
||||||
|
botmessagelog.messagelog(trigger.sb["log_id"], trigger.sb["com"] + ": " + str(trigger.sb["example"]))
|
||||||
|
return
|
||||||
|
|
||||||
|
elif trigger.sb["hyphen_arg"] in ['filename', 'filepath']:
|
||||||
|
botmessagelog.messagelog(trigger.sb["log_id"], "The " + str(trigger.sb["com"]) + " file is located at " + str(trigger.sb[trigger.sb["hyphen_arg"]]))
|
||||||
|
return
|
||||||
|
|
||||||
|
elif trigger.sb["hyphen_arg"] in ['foldername', 'folderpath']:
|
||||||
|
botmessagelog.messagelog(trigger.sb["log_id"], "The " + str(trigger.sb["com"]) + " folder is located at " + str(trigger.sb[trigger.sb["hyphen_arg"]]))
|
||||||
|
return
|
||||||
|
|
||||||
|
elif trigger.sb["hyphen_arg"] in ['author']:
|
||||||
|
botmessagelog.messagelog(trigger.sb["log_id"], "The author of the " + str(trigger.sb["com"]) + " command is " + trigger.sb["author"] + ".")
|
||||||
|
return
|
||||||
|
|
||||||
|
elif trigger.sb["hyphen_arg"] in ['contribs', 'contrib', "contributors"]:
|
||||||
|
botmessagelog.messagelog(trigger.sb["log_id"], "The contributors of the " + str(trigger.sb["com"]) + " command are " + spicemanip.main(trigger.sb["contributors"], "andlist") + ".")
|
||||||
|
return
|
||||||
|
|
||||||
|
elif trigger.sb["hyphen_arg"] in ['alias', 'aliases']:
|
||||||
|
botmessagelog.messagelog(trigger.sb["log_id"], "The alaises of the " + str(trigger.sb["com"]) + " command are " + spicemanip.main(trigger.sb["validcoms"], "andlist") + ".")
|
||||||
|
return
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@ -9,6 +9,7 @@ This module contains references only for other modules to utilize.
|
|||||||
from .Config import *
|
from .Config import *
|
||||||
from .Logs import *
|
from .Logs import *
|
||||||
from .Database import *
|
from .Database import *
|
||||||
|
from .MessageLog import *
|
||||||
|
|
||||||
from .Update import *
|
from .Update import *
|
||||||
from .osd import *
|
from .osd import *
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user