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