mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Add custom_id string to DynamicItem template regex error
This commit is contained in:
parent
9e2f2cb3af
commit
5126323640
@ -110,7 +110,7 @@ class DynamicItem(Generic[BaseT], Item['View']):
|
|||||||
raise TypeError('item must be dispatchable, e.g. not a URL button')
|
raise TypeError('item must be dispatchable, e.g. not a URL button')
|
||||||
|
|
||||||
if not self.template.match(self.custom_id):
|
if not self.template.match(self.custom_id):
|
||||||
raise ValueError(f'item custom_id must match the template {self.template.pattern!r}')
|
raise ValueError(f'item custom_id {self.custom_id!r} must match the template {self.template.pattern!r}')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def template(self) -> re.Pattern[str]:
|
def template(self) -> re.Pattern[str]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user