Add a command to send a message to a particular channel
This commit is contained in:
parent
cbd522991a
commit
1d859e0995
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue