diff --git a/cogs/autopublish.py b/cogs/autopublish.py new file mode 100644 index 0000000..87ee5ec --- /dev/null +++ b/cogs/autopublish.py @@ -0,0 +1,16 @@ +import discord +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() \ No newline at end of file diff --git a/main.py b/main.py index f491c7e..e168161 100644 --- a/main.py +++ b/main.py @@ -19,6 +19,7 @@ async def on_connect(): client.load_extension("cogs.music") client.load_extension("cogs.games") client.load_extension("cogs.fun") + client.load_extension("cogs.autopublish") @client.event async def on_ready():