adding autopublish github

This commit is contained in:
Mylloon 2020-12-11 11:58:16 +01:00
parent 98925544b1
commit 329329c8a5
2 changed files with 17 additions and 0 deletions

16
cogs/autopublish.py Normal file
View file

@ -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()

View file

@ -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():