1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Add a command to send a message to a particular channel

This commit is contained in:
Phxntxm 2017-05-05 15:53:12 -05:00
parent cbd522991a
commit 1d859e0995

View file

@ -140,6 +140,17 @@ class Owner:
await utils.update_content('motd', entry, key)
await ctx.send("New motd update for {}!".format(date))
@commands.command()
@commands.check(utils.is_owner)
async def sendtochannel(self, ctx, cid, message):
"""Sends a message to a provided channel, by ID"""
channel = self.bot.get_channel(cid)
await channel.send(message)
try:
await ctx.message.delete()
except discord.Forbidden:
pass
@commands.command()
@commands.check(utils.is_owner)
async def debug(self, ctx, *, code: str):