From e12609a6beb20a8be5fbdeb23b2d87fff41705f0 Mon Sep 17 00:00:00 2001 From: Lauchmelder23 Date: Sat, 1 Feb 2020 23:13:56 +0100 Subject: [PATCH] Nothing --- cogs/fun/logger.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cogs/fun/logger.py diff --git a/cogs/fun/logger.py b/cogs/fun/logger.py new file mode 100644 index 0000000..80d59e3 --- /dev/null +++ b/cogs/fun/logger.py @@ -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))