This repository has been archived on 2022-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
KassouBot/cogs/autopublish.py

16 lines
444 B
Python
Raw Normal View History

2020-12-11 11:58:16 +01:00
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()