@bot.command()
async def anon(ctx, *, arg):
if discord.ChannelType.private:
channel = bot.get_channel(#id)
await channel.send(arg)
@bot.command()
@commands.dm_only()
async def cmd(...):
isinstance(ctx.channel, discord.DMchannel)
# или
ctx.channel.type == discord.ChannelType.private