send can get PrivateChanels too by id

This commit is contained in:
ddorn 2020-05-11 13:32:04 +02:00
parent 110c483310
commit cf48072b23
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ class DevCog(Cog, name="Dev tools"):
def send(msg, channel=None): def send(msg, channel=None):
if isinstance(channel, int): if isinstance(channel, int):
channel = get(ctx.guild.channels, id=channel) channel = self.bot.get_channel(channel)
channel = channel or ctx.channel channel = channel or ctx.channel
asyncio.create_task(channel.send(msg)) asyncio.create_task(channel.send(msg))