diff options
Diffstat (limited to 'bot/exts/core')
| -rw-r--r-- | bot/exts/core/internal_eval/_internal_eval.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/bot/exts/core/internal_eval/_internal_eval.py b/bot/exts/core/internal_eval/_internal_eval.py index 5b5461f0..190a15ec 100644 --- a/bot/exts/core/internal_eval/_internal_eval.py +++ b/bot/exts/core/internal_eval/_internal_eval.py @@ -34,6 +34,8 @@ RAW_CODE_REGEX = re.compile(      re.DOTALL                               # "." also matches newlines  ) +MAX_LENGTH = 99980 +  class InternalEval(commands.Cog):      """Top secret code evaluation for admins and owners.""" @@ -85,9 +87,10 @@ class InternalEval(commands.Cog):      async def _upload_output(self, output: str) -> Optional[str]:          """Upload `internal eval` output to our pastebin and return the url.""" +        data = self.shorten_output(output, max_length=MAX_LENGTH)          try:              async with self.bot.http_session.post( -                "https://paste.pythondiscord.com/documents", data=output, raise_for_status=True +                "https://paste.pythondiscord.com/documents", data=data, raise_for_status=True              ) as resp:                  data = await resp.json() | 
