Commands split up into single files and included first methods
This commit is contained in:
parent
5c2ff27656
commit
ef19e6659e
9 changed files with 93 additions and 29 deletions
|
|
@ -12,8 +12,8 @@ class Command:
|
|||
api: riotwatcher.LolWatcher
|
||||
commandName = ""
|
||||
|
||||
def __init__(self, pref, api: riotwatcher.LolWatcher, addkeywords: list):
|
||||
for i in addkeywords:
|
||||
def __init__(self, pref, api: riotwatcher.LolWatcher, additionalKeywords: list):
|
||||
for i in additionalKeywords:
|
||||
self.keywords.append(i)
|
||||
self.pref = pref
|
||||
self.api = api
|
||||
|
|
@ -37,9 +37,9 @@ class Command:
|
|||
return False
|
||||
|
||||
def log(self, message: discord.Message):
|
||||
logMSG = (self.commandName + " request sent in Channel " + str(message.channel.name) + "\n\t- at: " + str(
|
||||
logMSG = (self.commandName + " request sent:\n\t-in: " + str(message.channel.name) + "\n\t- at: " + str(
|
||||
datetime.now())[:-7] + "\n\t- by: " + str(message.author) + "\n\t- content: '" + str(
|
||||
message.content) + "'\n")
|
||||
print(logMSG)
|
||||
with open("requests.log", "a") as f:
|
||||
f.write(logMSG)
|
||||
f.write(logMSG)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue