mirror of
https://github.com/MrDetonia/Maki.git
synced 2024-11-22 11:54:16 -05:00
v1.0.4 - setup logging on start, removed debugging info
This commit is contained in:
parent
cadb2fb4c6
commit
b0fe3033c7
3
bot.py
3
bot.py
@ -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)
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user