Add utils.MISSING

This commit is contained in:
Nadir Chowdhury
2021-04-29 06:58:36 +01:00
committed by GitHub
parent a2df6e81b8
commit c786a85a9b
5 changed files with 20 additions and 24 deletions

View File

@ -45,7 +45,7 @@ from ..message import Message
from ..http import Route
from ..object import Object
from .async_ import BaseWebhook, handle_message_parameters, _WebhookState, MISSING
from .async_ import BaseWebhook, handle_message_parameters, _WebhookState
__all__ = (
'SyncWebhook',
@ -68,6 +68,8 @@ if TYPE_CHECKING:
except ModuleNotFoundError:
pass
MISSING = utils.MISSING
class DeferredLock:
def __init__(self, lock: threading.Lock):
@ -333,6 +335,7 @@ class WebhookAdapter:
route = Route('GET', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)
return self.request(route, session=session)
_context = threading.local()
_context.adapter = WebhookAdapter()