diff options
Diffstat (limited to 'bot/exts/moderation/dm_relay.py')
-rw-r--r-- | bot/exts/moderation/dm_relay.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bot/exts/moderation/dm_relay.py b/bot/exts/moderation/dm_relay.py index bf0b96a58..5bec3b10f 100644 --- a/bot/exts/moderation/dm_relay.py +++ b/bot/exts/moderation/dm_relay.py @@ -1,11 +1,11 @@ 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 bot.bot import Bot from bot.constants import Emojis, MODERATION_ROLES from bot.log import get_logger from bot.utils.channel import is_mod_channel -from bot.utils.services import PasteTooLongError, PasteUploadError, send_to_paste_service log = get_logger(__name__) @@ -54,7 +54,12 @@ class DMRelay(Cog): f"Channel ID: {user.dm_channel.id}\n\n" ) try: - message = await send_to_paste_service(metadata + output, extension="txt") + resp = await send_to_paste_service( + contents=metadata + output, + lexer="text", + http_session=self.bot.http_session, + ) + message = resp["link"] except PasteTooLongError: message = f"{Emojis.cross_mark} Too long to upload to paste service." except PasteUploadError: |