def say_and_pm(ctx, content):
"""Send message to current channel as well as the command message's author.
`ctx` can be either `discord.Message` or `commands.Context`
"""
channel = ctx.channel
author = ctx.author
to_say = content.format(channel='')
to_pm = content.format(channel=f'in {channel.mention}')
return (await ctx.send(to_say),
await author.send(to_pm))
评论列表
文章目录