Bläddra i källkod

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

master
Zac Herd 7 år sedan
förälder
incheckning
b0fe3033c7
3 ändrade filer med 3 tillägg och 4 borttagningar
  1. +2
    -1
      bot.py
  2. +0
    -2
      commands.py
  3. +1
    -1
      common.py

+ 2
- 1
bot.py Visa fil

@@ -60,7 +60,7 @@ def on_message(msg):
# print messages to terminal for info
timestr = time.strftime('%Y-%m-%d-%H:%M:%S: ')
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:
print("{} | PRIVATE | {}: {}".format(timestr, msg.author.name, msg.content))

@@ -94,6 +94,7 @@ def on_message(msg):

# MAIN FUNCTION
def main():
logger()
client.run(token)
exit(0)



+ 0
- 2
commands.py Visa fil

@@ -88,10 +88,8 @@ def cmd_seen(client, msg):

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




+ 1
- 1
common.py Visa fil

@@ -13,7 +13,7 @@ import json


# bot version
version = "v1.0.3"
version = "v1.0.4"


# TODO: generate this on the fly and make it look acceptable


Laddar…
Avbryt
Spara