I wanted to make an error command for my code, that gets shown when the dms are turned off or the user wasn't found, here's my code:
@client.command()
async def DM(ctx, user: discord.User, *, message=None):
message = message or "DM message to be sent"
await user.send(message)