📄 Logging
This commit is contained in:
1 parent
8e6a6e0b55
commit
c6a7f35602
2 files changed
+60
-55
No files matched your search
+8
-3
@@ -100,10 +100,15 @@ def imageFunc():
|
||||
logThis("Couldn't connect to bing (error code 701)")
|
||||
return(image)
|
||||
|
||||
def logThis(message : str):
|
||||
def logThis(message : str, channel = ""):
|
||||
localtime = time.asctime(time.localtime(time.time()))
|
||||
print(localtime+" - "+message)
|
||||
logging.info(localtime+" - "+message)
|
||||
channel = channel.replace("Direct message with ","")
|
||||
if channel == "":
|
||||
print(localtime+" - "+message)
|
||||
logging.info(localtime+" - "+message)
|
||||
else:
|
||||
print(localtime+" ("+channel+") - "+message)
|
||||
logging.info(localtime+" ("+channel+") - "+message)
|
||||
|
||||
# Finds a page from the Senkulpa Wikia
|
||||
def findWikiPage(search : str):
|
||||
|
||||
Reference in new issue
Block a user