From e1e51379540be547de0ca3db564a8c1fe1261405 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 1 Jun 2021 21:21:13 +0200 Subject: [PATCH] removing autopublish and adding it to my personal cog --- src/cogs/autopublish.py | 15 --------------- src/cogs/confreriedukassoulait.py | 5 ++++- src/main.py | 1 - 3 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 src/cogs/autopublish.py diff --git a/src/cogs/autopublish.py b/src/cogs/autopublish.py deleted file mode 100644 index 8c71223..0000000 --- a/src/cogs/autopublish.py +++ /dev/null @@ -1,15 +0,0 @@ -from discord.ext import commands - -def setup(client): - client.add_cog(Autopublish(client)) - -class Autopublish(commands.Cog): - """Autopublish.""" - - def __init__(self, client): - self.client = client - - @commands.Cog.listener() - async def on_message(self, message): - if message.author.id == 786897204816117771 and message.author.name == "GitHub" and message.author.bot: - await message.publish() diff --git a/src/cogs/confreriedukassoulait.py b/src/cogs/confreriedukassoulait.py index d28e8a2..4fcdf62 100644 --- a/src/cogs/confreriedukassoulait.py +++ b/src/cogs/confreriedukassoulait.py @@ -105,9 +105,12 @@ class ConfrerieDuKassoulait(commands.Cog): # info sur la personne qui a supprimé ne fonctionne pas si il a supprimé un message auparavant (les logs se rajoute a un log deja existant) - # autre serveur @commands.Cog.listener() async def on_message(self, message): + if message.author.id == 786897204816117771 and message.author.name == "GitHub" and message.author.bot: # Autopublish + await message.publish() + + # autre serveur if message.channel.id == 770805818487865404 or message.channel.id == 772239638240165928: # Le groupe de l'amour ❤❤ -- channel chien/chat chiens = ["dog", "chien", "potichien", "doggo"] chats = ["kat", "mace", "kater", "katze", "sinta", "minoos", "cat", "qitt", "besseh", "katu", "caun", "kazh", diff --git a/src/main.py b/src/main.py index 039d094..9a74c3b 100644 --- a/src/main.py +++ b/src/main.py @@ -18,7 +18,6 @@ client.load_extension("cogs.internet") client.load_extension("cogs.music") client.load_extension("cogs.games") client.load_extension("cogs.fun") -client.load_extension("cogs.autopublish") client.load_extension("cogs.school") client.load_extension("cogs.confreriedukassoulait") # you can remove this cogs, only for my private guild print("Terminé !")