Skip to content

Commit

Permalink
Fix doc breaking for weird signatures.
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristgit committed Jun 15, 2018
1 parent b5f830c commit 7d2b784
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bot/cogs/doc.py
Expand Up @@ -3,6 +3,7 @@
import logging
import random
import re
import textwrap
from collections import OrderedDict
from typing import Dict, List, Optional, Tuple

Expand Down Expand Up @@ -258,6 +259,7 @@ async def get_symbol_embed(self, symbol: str) -> Optional[discord.Embed]:
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,
Expand Down

0 comments on commit 7d2b784

Please sign in to comment.