changed logFile to md and fixed no name in commands
This commit is contained in:
parent
169599dff5
commit
6ddb040f89
8 changed files with 13 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ from APICommands.Command import getSummonerNameFromMessage, getChampionsJSON, ch
|
|||
|
||||
|
||||
class ChampionMastery(APICommands.Command.Command, ABC):
|
||||
commandName = "Champion mastery"
|
||||
keywords = ["cm", "CM", "Championmastery", "championmastery"]
|
||||
|
||||
def __init__(self, pref, api: riotwatcher.LolWatcher, region: str, additionalKeywords: list):
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ class Command:
|
|||
return False
|
||||
|
||||
def log(self, message: discord.Message):
|
||||
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(
|
||||
LogMSG = ("## " + self.commandName + " request sent:\n* in: " + str(message.channel.name) + "\n* at: " + str(
|
||||
datetime.now())[:-7] + "\n* by: " + str(message.author) + "\n* content: '" + str(
|
||||
message.content) + "'\n")
|
||||
print(logMSG)
|
||||
with open("requests.log", "a") as f:
|
||||
f.write(logMSG)
|
||||
print(LogMSG)
|
||||
with open("requests.md", "a") as f:
|
||||
f.write(LogMSG)
|
||||
|
||||
async def checkSumname(self, sumname, message: discord.Message):
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import APICommands.Command
|
|||
|
||||
|
||||
class Free2Play(APICommands.Command.Command, ABC):
|
||||
commandName = "Free 2 Play"
|
||||
keywords = ["f2p", "rotation", "F2P", "ROTATION"]
|
||||
|
||||
def __init__(self, pref, api: riotwatcher.LolWatcher, region: str, additionalKeywords=None):
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ from APICommands.Command import intTryParse, championIdToName, getChampionsJSON,
|
|||
|
||||
|
||||
class HighestMastery(APICommands.Command.Command, ABC):
|
||||
commandName = "Highest mastery"
|
||||
keywords = ["highestmastery", "highestMastery", "HM", "hm", "Hm", "HighestMastery"]
|
||||
|
||||
def __init__(self, pref, api: riotwatcher.LolWatcher, region: str, additionalKeywords: list):
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import APICommands.Command
|
|||
|
||||
|
||||
class Prefix(APICommands.Command.Command, ABC):
|
||||
commandName = "Prefix"
|
||||
keywords = ["prefix"]
|
||||
|
||||
def __init__(self, pref, api: riotwatcher.LolWatcher, region: str, additionalKeywords=None):
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ from APICommands.Command import getSummonerNameFromMessage
|
|||
|
||||
|
||||
class SummonerLevel(APICommands.Command.Command, ABC):
|
||||
commandName = "Summoner level"
|
||||
keywords = ["level", "Level", "lvl"]
|
||||
|
||||
def __init__(self, pref, api: riotwatcher.LolWatcher, region: str, additionalKeywords: list):
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ def truncate(f, n):
|
|||
|
||||
|
||||
class SummonerRank(APICommands.Command.Command, ABC):
|
||||
commandName = "Summoner rank"
|
||||
keywords = ["rank", "Rank", "RANK"]
|
||||
|
||||
def __init__(self, pref, api: riotwatcher.LolWatcher, region: str, additionalKeywords=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue