mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-11 16:44:53 +00:00
Fix callback query
This commit is contained in:
parent
e8d3aed257
commit
2af6d257f5
1 changed files with 9 additions and 3 deletions
|
|
@ -98,9 +98,15 @@ class CallbackQueryHandler(Handler):
|
|||
client, query
|
||||
)
|
||||
|
||||
handler_does_match = (
|
||||
await self.filters(client, query) if callable(self.filters) else True
|
||||
)
|
||||
if callable(self.filters):
|
||||
if iscoroutinefunction(self.filters.__call__):
|
||||
handler_does_match = await self.filters(client, query)
|
||||
else:
|
||||
handler_does_match = await client.loop.run_in_executor(
|
||||
None, self.filters, client, query
|
||||
)
|
||||
else:
|
||||
handler_does_match = True
|
||||
|
||||
data = self.compose_data_identifier(query)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue