aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joseph Banks <[email protected]>2018-06-21 21:46:11 +0000
committerGravatar Joseph Banks <[email protected]>2018-06-21 21:46:11 +0000
commitf4ab50883aff3f1cc7a6567a00c2d1dc2cb31fc9 (patch)
treeb35b68ea6035e802e8bbb5ef7dde031f6309cbbc
parent[RMQ] Fix role assignment (diff)
parentFix `doc` breaking for weird signatures. (diff)
Merge branch 'fix-doc-command-for-long-signature' into 'master'
Fix `doc` breaking for weird signatures. See merge request python-discord/projects/bot!3
-rw-r--r--bot/cogs/doc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/cogs/doc.py b/bot/cogs/doc.py
index d84de0ba3..26079e3ec 100644
--- a/bot/cogs/doc.py
+++ b/bot/cogs/doc.py
@@ -3,6 +3,7 @@ import functools
import logging
import random
import re
+import textwrap
from collections import OrderedDict
from typing import Dict, List, Optional, Tuple
@@ -258,6 +259,7 @@ class Doc:
description="This appears to be a generic page not tied to a specific symbol."
)
+ signature = textwrap.shorten(signature, 500)
return discord.Embed(
title=f'`{symbol}`',
url=permalink,