aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/moderation/dm_relay.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/moderation/dm_relay.py')
-rw-r--r--bot/exts/moderation/dm_relay.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/moderation/dm_relay.py b/bot/exts/moderation/dm_relay.py
index e8c5a5428..03b18e46a 100644
--- a/bot/exts/moderation/dm_relay.py
+++ b/bot/exts/moderation/dm_relay.py
@@ -1,6 +1,6 @@
import discord
from discord.ext.commands import Cog, Context, command, has_any_role
-from pydis_core.utils.paste_service import PasteTooLongError, PasteUploadError, send_to_paste_service
+from pydis_core.utils.paste_service import PasteFile, PasteTooLongError, PasteUploadError, send_to_paste_service
from bot.bot import Bot
from bot.constants import BaseURLs, Emojis, MODERATION_ROLES
@@ -53,14 +53,14 @@ class DMRelay(Cog):
f"User: {user} ({user.id})\n"
f"Channel ID: {user.dm_channel.id}\n\n"
)
+ file = PasteFile(content=metadata + output, lexer="text")
try:
resp = await send_to_paste_service(
- contents=metadata + output,
- lexer="text",
+ files=[file],
http_session=self.bot.http_session,
paste_url=BaseURLs.paste_url,
)
- message = resp["link"]
+ message = resp.link
except PasteTooLongError:
message = f"{Emojis.cross_mark} Too long to upload to paste service."
except PasteUploadError: