From d77af18516a030dd039014e2fcf5bb56e09e8358 Mon Sep 17 00:00:00 2001 From: Den4200 Date: Tue, 30 Mar 2021 16:00:21 -0400 Subject: Replace usage of `textwrap.dedent` with a cleaner method. --- bot/exts/moderation/dm_relay.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bot/exts/moderation/dm_relay.py b/bot/exts/moderation/dm_relay.py index a03230b3d..68a48c67c 100644 --- a/bot/exts/moderation/dm_relay.py +++ b/bot/exts/moderation/dm_relay.py @@ -1,5 +1,4 @@ import logging -import textwrap import discord from discord.ext.commands import Cog, Context, command, has_any_role @@ -50,10 +49,10 @@ class DMRelay(Cog): await ctx.send(f"{Emojis.cross_mark} No direct message history with {user.mention}.") return - metadata = textwrap.dedent(f"""\ - User: {user} ({user.id}) - Channel ID: {user.dm_channel.id}\n - """) + metadata = ( + f"User: {user} ({user.id})\n" + f"Channel ID: {user.dm_channel.id}\n\n" + ) paste_link = await send_to_paste_service(metadata + output, extension="txt") await ctx.send(paste_link) -- cgit v1.2.3