docs: add license info and reformat (#1)
This commit is contained in:
parent
d1475a7101
commit
b5bef75199
@ -129,3 +129,7 @@ Contributions are welcome! Please open an issue or submit a pull request.
|
||||
|
||||
See the [docs](docs/) directory for detailed guides on components, slash commands, caching, and voice features.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the BSD 3-Clause license. See the [LICENSE](LICENSE) file for details.
|
||||
|
||||
|
@ -166,6 +166,7 @@ class GatewayClient:
|
||||
print(
|
||||
f"Sent RESUME for session {self._session_id} at sequence {self._last_sequence}."
|
||||
)
|
||||
|
||||
async def update_presence(
|
||||
self,
|
||||
status: str,
|
||||
@ -179,14 +180,16 @@ class GatewayClient:
|
||||
"op": GatewayOpcode.PRESENCE_UPDATE,
|
||||
"d": {
|
||||
"since": since,
|
||||
"activities": [
|
||||
"activities": (
|
||||
[
|
||||
{
|
||||
"name": activity_name,
|
||||
"type": activity_type,
|
||||
}
|
||||
]
|
||||
if activity_name
|
||||
else [],
|
||||
else []
|
||||
),
|
||||
"status": status,
|
||||
"afk": afk,
|
||||
},
|
||||
|
@ -55,13 +55,9 @@ intents = GatewayIntent.default() | GatewayIntent.MESSAGE_CONTENT
|
||||
|
||||
# Create a new client
|
||||
client = Client(
|
||||
|
||||
token=token,
|
||||
|
||||
intents=intents,
|
||||
|
||||
command_prefix="!",
|
||||
|
||||
mention_replies=True,
|
||||
)
|
||||
|
||||
|
@ -36,6 +36,8 @@ class DummyBot:
|
||||
|
||||
async def fetch_channel(self, cid):
|
||||
return self._channels.get(cid)
|
||||
|
||||
|
||||
from disagreement.ext.commands.core import CommandContext, Command
|
||||
from disagreement.enums import MessageFlags, ButtonStyle, ComponentType
|
||||
from disagreement.models import ActionRow, Button, Container, TextDisplay
|
||||
|
@ -26,6 +26,7 @@ class DummyClient:
|
||||
self.loop = asyncio.get_event_loop()
|
||||
self.application_id = None # Mock application_id for Client.connect
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_client_connect_backoff(monkeypatch):
|
||||
http = DummyHTTP()
|
||||
|
@ -7,6 +7,7 @@ from disagreement.errors import DisagreementException
|
||||
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
|
||||
class DummyGateway(MagicMock):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user