aboutsummaryrefslogtreecommitdiff
path: root/discord/webhook/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/webhook/sync.py')
-rw-r--r--discord/webhook/sync.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py
index 98bb528e..23445317 100644
--- a/discord/webhook/sync.py
+++ b/discord/webhook/sync.py
@@ -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()