adding autopublish github
This commit is contained in:
parent
98925544b1
commit
329329c8a5
2 changed files with 17 additions and 0 deletions
16
cogs/autopublish.py
Normal file
16
cogs/autopublish.py
Normal 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()
|
1
main.py
1
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():
|
||||
|
|
Reference in a new issue