1
0
mirror of https://github.com/MrDetonia/Maki.git synced 2024-11-22 03:44:18 -05:00

v1.0.4 - setup logging on start, removed debugging info

This commit is contained in:
Zac Herd 2017-05-12 11:28:41 +00:00
parent cadb2fb4c6
commit b0fe3033c7
3 changed files with 3 additions and 4 deletions

3
bot.py
View File

@ -60,7 +60,7 @@ def on_message(msg):
# print messages to terminal for info # print messages to terminal for info
timestr = time.strftime('%Y-%m-%d-%H:%M:%S: ') timestr = time.strftime('%Y-%m-%d-%H:%M:%S: ')
try: try:
print("{} | {} - {} | {}: {}".format(timestr, msg.server.name, msg.channel.name, msg.author.name, msg.content)) print("{} {} - {} | {}: {}".format(timestr, msg.server.name, msg.channel.name, msg.author.name, msg.content))
except AttributeError: except AttributeError:
print("{} | PRIVATE | {}: {}".format(timestr, msg.author.name, msg.content)) print("{} | PRIVATE | {}: {}".format(timestr, msg.author.name, msg.content))
@ -94,6 +94,7 @@ def on_message(msg):
# MAIN FUNCTION # MAIN FUNCTION
def main(): def main():
logger()
client.run(token) client.run(token)
exit(0) exit(0)

View File

@ -88,10 +88,8 @@ def cmd_seen(client, msg):
@asyncio.coroutine @asyncio.coroutine
def cmd_say(client, msg): def cmd_say(client, msg):
print("IN CMD_SAY")
response = msg.content[5:] response = msg.content[5:]
yield from client.delete_message(msg) yield from client.delete_message(msg)
print("CALLING SEND")
yield from discord_send(client, msg, response) yield from discord_send(client, msg, response)

View File

@ -13,7 +13,7 @@ import json
# bot version # bot version
version = "v1.0.3" version = "v1.0.4"
# TODO: generate this on the fly and make it look acceptable # TODO: generate this on the fly and make it look acceptable