diff --git a/.gitignore b/.gitignore index 319fce8..52532c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/requests.log +/requests.md +/*.key diff --git a/APICommands/ChampionMasteryCommand.py b/APICommands/ChampionMasteryCommand.py index b596037..e0da68b 100644 --- a/APICommands/ChampionMasteryCommand.py +++ b/APICommands/ChampionMasteryCommand.py @@ -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): diff --git a/APICommands/Command.py b/APICommands/Command.py index 3d6a2fd..45ce1ac 100644 --- a/APICommands/Command.py +++ b/APICommands/Command.py @@ -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: diff --git a/APICommands/F2PCommand.py b/APICommands/F2PCommand.py index 532f17c..350ee8d 100644 --- a/APICommands/F2PCommand.py +++ b/APICommands/F2PCommand.py @@ -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): diff --git a/APICommands/HighestMasteryCommand.py b/APICommands/HighestMasteryCommand.py index b488c1a..497b038 100644 --- a/APICommands/HighestMasteryCommand.py +++ b/APICommands/HighestMasteryCommand.py @@ -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): diff --git a/APICommands/PrefixCommand.py b/APICommands/PrefixCommand.py index d0b3d9b..80ec895 100644 --- a/APICommands/PrefixCommand.py +++ b/APICommands/PrefixCommand.py @@ -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): diff --git a/APICommands/SummonerLevelCommand.py b/APICommands/SummonerLevelCommand.py index 46d10c6..3cf84ae 100644 --- a/APICommands/SummonerLevelCommand.py +++ b/APICommands/SummonerLevelCommand.py @@ -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): diff --git a/APICommands/SummonerRankCommand.py b/APICommands/SummonerRankCommand.py index 412f67e..3f0b1a9 100644 --- a/APICommands/SummonerRankCommand.py +++ b/APICommands/SummonerRankCommand.py @@ -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):