This commit is contained in:
Lauchmelder23 2020-02-01 23:13:56 +01:00
parent a7a92f5b51
commit e12609a6be

23
cogs/fun/logger.py Normal file
View file

@ -0,0 +1,23 @@
import discord
from discord.ext import commands
class Logger(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_message(self, message):
if message.author.bot:
return
if message.channel.id != 439466964625391637:
return
if message.content.startswith(('.', '!', '-', '?', '/')):
return
with open('data/naughty_step.txt', 'a') as file:
file.write(message.content + '\n')
def setup(client):
client.add_cog(Logger(client))