def connect(self, ctx, channel):
me, channel_name = (channel.me, '%s\'s DMs' % channel.recipient) if isinstance(channel, discord.DMChannel) else (channel.guild.me, channel.name)
if channel is None:
await ctx.send('BAKA! I can\'t access that channel!')
return
elif channel.permissions_for(me).send_messages is False:
await ctx.send('BAKA! I can\'t speak in that channel!')
return
await ctx.send('Connecting to %s' % channel_name)
portal_key = (ctx.author, ctx.channel)
self.portals[portal_key] = channel
return portal_key
评论列表
文章目录