Don't log chat message anymore

This commit is contained in:
Mylloon 2021-07-29 00:56:33 +02:00
parent 8ff719f01e
commit ffcbfd3d3f

View file

@ -6,7 +6,7 @@ from utils.commands import CommandesDB
class Bot(commands.Bot): class Bot(commands.Bot):
def __init__(self): def __init__(self):
self.keys = load(["ACCESS_TOKEN", "PREFIX", "CHANNEL"]) self.keys = load(["ACCESS_TOKEN", "PREFIX", "CHANNEL"])
super().__init__(token=self.keys["ACCESS_TOKEN"], prefix=self.keys["PREFIX"], initial_channels=self.keys["CHANNEL"]) super().__init__(token = self.keys["ACCESS_TOKEN"], prefix = self.keys["PREFIX"], initial_channels = self.keys["CHANNEL"])
async def event_ready(self): async def event_ready(self):
CommandesDB().creationTable() CommandesDB().creationTable()
@ -16,9 +16,8 @@ class Bot(commands.Bot):
if message.echo: # Messages with echo set to True are messages sent by the bot if message.echo: # Messages with echo set to True are messages sent by the bot
return return
# Print the contents of our message to console # if not message.content.startswith(self.keys["PREFIX"]):
if not message.content.startswith(self.keys["PREFIX"]): # print(f"{message.author.name}: {message.content}")
print(f"{message.author.name}: {message.content}")
await self.handle_commands(message) # Let the bot know we want to handle and invoke our commands await self.handle_commands(message) # Let the bot know we want to handle and invoke our commands