Fix NameError with resolving codes with Template

This commit is contained in:
Nadir Chowdhury 2020-08-01 02:07:20 +01:00 committed by GitHub
parent b77af19939
commit 6d88316767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -469,7 +469,7 @@ def resolve_template(code):
"""
from .template import Template # circular import
if isinstance(code, Template):
return template.code
return code.code
else:
rx = r'(?:https?\:\/\/)?discord(?:\.new|(?:app)?\.com\/template)\/(.+)'
m = re.match(rx, code)