diff options
author | 2021-03-30 16:00:21 -0400 | |
---|---|---|
committer | 2021-03-30 16:00:21 -0400 | |
commit | d77af18516a030dd039014e2fcf5bb56e09e8358 (patch) | |
tree | f94238e3615089424c5fcba5ceb70d3f538bd860 | |
parent | Remove `dm_log` from channels and webhooks in the config. (diff) |
Replace usage of `textwrap.dedent` with a cleaner method.
-rw-r--r-- | bot/exts/moderation/dm_relay.py | 9 |
1 files 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) |