Fix non-ascii number codes in !pep
This commit is contained in:
parent
ef31a9ec0e
commit
172b8d5dac
5
bot.py
5
bot.py
|
|
@ -298,9 +298,8 @@ def cmd_uptime(match: Match[str]) -> Response:
|
|||
@handle_message(r'!pep[ ]?(?P<pep_num>\d{1,4})')
|
||||
def cmd_pep(match: Match[str]) -> Response:
|
||||
*_, number = match.groups()
|
||||
return MessageResponse(
|
||||
match, f'https://www.python.org/dev/peps/pep-{int(number).zfill(4)}/',
|
||||
)
|
||||
n = str(int(number)).zfill(4)
|
||||
return MessageResponse(match, f'https://www.python.org/dev/peps/pep-{n}/')
|
||||
|
||||
|
||||
COMMAND_RE = re.compile(r'!\w+')
|
||||
|
|
|
|||
Loading…
Reference in New Issue