As what the title mentioned, i confused how to use \n
in message argument for command in discord.py
. As you can see, the below one is code that I made for sending/ whispering someone in the server by DM.
@cog_ext.cog_slash(name='whisper', description='Whisper someone', guild_ids=guild_ids)
async def whisper(self, ctx, member:discord.Member, message:str):
if ctx.author.id != 385053392059236353:
if member.id == 385053392059236353:
await member.send(f"{message}, from {ctx.author.name}")
await ctx.send("Message sent!", hidden=True)
else:
await member.send(f"{message}")
await ctx.send("Message sent!", hidden=True)
else:
await member.send(f"{message}")
await ctx.send("Message sent!", hidden=True)
And this is what I want to do : How to implement that?
