mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-06-22 18:54:10 +00:00
style: trim _send_payload docstring
This commit is contained in:
parent
9643b477da
commit
b853222c87
@ -125,10 +125,7 @@ class DiscordChannel(BaseChannel):
|
|||||||
async def _send_payload(
|
async def _send_payload(
|
||||||
self, url: str, headers: dict[str, str], payload: dict[str, Any]
|
self, url: str, headers: dict[str, str], payload: dict[str, Any]
|
||||||
) -> bool:
|
) -> bool:
|
||||||
"""Send a single Discord API payload with retry on rate-limit.
|
"""Send a single Discord API payload with retry on rate-limit. Returns True on success."""
|
||||||
|
|
||||||
Returns True on success, False if all attempts failed.
|
|
||||||
"""
|
|
||||||
for attempt in range(3):
|
for attempt in range(3):
|
||||||
try:
|
try:
|
||||||
response = await self._http.post(url, headers=headers, json=payload)
|
response = await self._http.post(url, headers=headers, json=payload)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user