189 Commits

Author SHA1 Message Date
5d72643390
Add is_owner decorator and owner checks (#81) 2025-06-15 15:23:52 -06:00
c7eb8563de
Add channel lists to Guild (#82) 2025-06-15 15:22:49 -06:00
a68bbe7826
Add guilds property to client (#83) 2025-06-15 15:21:01 -06:00
6eff962682
feat: dispatch connect events (#80)
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
2025-06-15 15:20:13 -06:00
f24c1befac
feat(client): track connection time (#84) 2025-06-15 15:20:06 -06:00
c811e2b578
Extend File to handle streams (#85) 2025-06-15 15:20:04 -06:00
9f2fc0857b
feat(client): sync commands on ready (#86) 2025-06-15 15:20:00 -06:00
775dce0c80
Store shard id on guild and expose shard property (#87) 2025-06-15 15:19:58 -06:00
a93ad432b7
Add thread and invite event parsing (#88) 2025-06-15 15:19:56 -06:00
3a264f4530 feat(ext-loader): Support async setup functions
Allow extension `setup` functions to be asynchronous. The loader now checks if `module.setup` returns an awaitable and runs it using asyncio, handling cases where an event loop is already running or not.

This enables extensions to perform asynchronous initialization tasks.
2025-06-15 15:17:42 -06:00
Slipstreamm
a41a301927 fix(core): Improve client ready state and user parsing
The `_ready_event` is now set in `GatewayClient` immediately after
receiving the `READY` payload, before dispatching `on_ready` to user code.
This ensures `Client.wait_until_ready()` and `Client.is_ready()`
accurately reflect the client's state before dependent user logic executes.

This change allows simplifying `Client.sync_commands` by removing
redundant `wait_until_ready()` calls and `application_id` checks,
as the application ID is guaranteed to be available upon READY.

Additionally, `User` model initialization is improved to correctly handle
nested user data found in certain API payloads (e.g., within `member`
objects in events like `PresenceUpdate`).

Add `SOUNDBOARD` and `VIDEO_QUALITY_720_60FPS` to `GuildFeature` enum.
v0.8.1
2025-06-14 23:49:33 -06:00
Slipstreamm
bd16b1c026 chore(release): Bump version to 0.8.0 v0.8.0 2025-06-14 21:53:41 -06:00
460583ef30
Fix pylint errors due to conditional imports (#78) 2025-06-14 21:52:59 -06:00
f1ca18a62a
Fix pylint errors due to conditional imports (#79) 2025-06-14 21:52:29 -06:00
Slipstreamm
2c8e426353 chore(release): Bump version to 0.7.0 v0.7.0 2025-06-14 21:41:30 -06:00
c9aec0dc7e
Improve command sync and DM support (#77) 2025-06-14 21:40:52 -06:00
Slipstreamm
bd92806c4c bump 2 0.6.0 v0.6.0 2025-06-14 19:06:57 -06:00
Slipstreamm
e965a675c1 refactor(api): Re-export common symbols from top-level package
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Makes commonly used classes, functions, and decorators from `disagreement.ext` and `disagreement.ui` submodules directly accessible under the `disagreement` namespace.

This change simplifies import statements for users, leading to cleaner and more concise code. Documentation and examples have been updated to reflect these new, simplified import paths.
2025-06-14 18:57:12 -06:00
Slipstreamm
9237d12a24 docs(imports): Update import paths in documentation examples
Adjust examples to reflect the new top-level exposure of classes and enums, such as `Client`, `Permissions`, `Embed`, and `Button`, making imports simpler.
2025-06-14 18:44:04 -06:00
Slipstreamm
420c57df30 chore: Bump version to 0.5.0 in __init__.py and pyproject.toml v0.5.0 2025-06-14 18:22:20 -06:00
Slipstreamm
b039b2e948 refactor(init): Consolidate module imports and exports
This commit refactors the `disagreement/__init__.py` file to import and export new models, enums, and components.

The primary changes are:
- Add imports and exports for `Member`, `Role`, `Attachment`, `Channel`, `ActionRow`, `Button`, `SelectOption`, `SelectMenu`, `Embed`, `PartialEmoji`, `Section`, `TextDisplay`, `Thumbnail`, `UnfurledMediaItem`, `MediaGallery`, `MediaGalleryItem`, `Container`, and `Guild` from `disagreement.models`.
- Add imports and exports for `ButtonStyle`, `ChannelType`, `MessageFlags`, `InteractionType`, `InteractionCallbackType`, and `ComponentType` from `disagreement.enums`.
- Add `Interaction` from `disagreement.interactions`.
- Add `ui` and `ext` as top-level modules.
- Update `disagreement.ext/__init__.py` to expose `app_commands`, `commands`, and `tasks`.

These changes consolidate the library's public API, making new features more accessible.
The example files were also updated to use the direct imports from the `disagreement` package or its `ext` subpackage, improving readability and consistency.
2025-06-14 18:17:57 -06:00
f58ffe8321
Apply global allowed_mentions setting (#76)
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
2025-06-13 22:10:19 -06:00
Slipstreamm
ffdb922142 ci(mirror): Make mirror remote addition idempotent
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Wrap the `git remote add mirror` command in a conditional check.

This ensures the remote is only added if it doesn't already exist,
preventing potential errors if the command is executed multiple times
or if the remote is somehow already configured in the runner environment.
2025-06-13 00:30:31 -06:00
Slipstreamm
2b8f29bde2 chore(docs): Add CNAME file for custom domain configuration 2025-06-13 00:26:44 -06:00
Slipstreamm
f7a47619ac ci(workflows): Migrate to self-hosted runners
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Switch GitHub Actions workflows (`docs`, `mirror`, `pypi`) from `ubuntu-latest` to `self-hosted` runners.

This change also updates the Python environment setup in `docs.yml` and `pypi.yml` to manually create and activate a virtual environment (`venv`). This provides more control over the Python environment on self-hosted machines and ensures dependencies are isolated.
2025-06-13 00:23:55 -06:00
Slipstreamm
675aab39ce chore(ci): Activate virtual environment before running Pyright and tests 2025-06-13 00:21:23 -06:00
Slipstreamm
a2bdc66ced chore(deps): Add aiohttp and python-dotenv to test dependencies 2025-06-13 00:16:23 -06:00
Slipstreamm
6fb371455b Update exclusion patterns in pyrightconfig.json to include virtual environments 2025-06-13 00:12:37 -06:00
Slipstreamm
8a228a9e1b Refactor Pyright execution step to simplify command 2025-06-13 00:11:50 -06:00
Slipstreamm
1505bdfd0a Add output of pyrightconfig.json before running Pyright 2025-06-13 00:10:33 -06:00
Slipstreamm
7354ff2244 Simplify dependency installation in CI workflow 2025-06-13 00:10:24 -06:00
Slipstreamm
66eb50833b Add output of pyrightconfig.json before running Pyright 2025-06-13 00:08:19 -06:00
Slipstreamm
398c2c34c0 Update CI workflow to include current directory output before running Pyright 2025-06-13 00:06:52 -06:00
2e72103b6a
Update ci.yml 2025-06-13 00:03:28 -06:00
91821e1c1d
Update ci.yml 2025-06-12 23:57:06 -06:00
12b14b9187
Update ci.yml 2025-06-12 23:55:41 -06:00
fae9cddb88
Update ci.yml 2025-06-12 23:52:54 -06:00
fd9ce4bbb8
Update ci.yml 2025-06-12 23:48:26 -06:00
3adce99f22
Update ci.yml 2025-06-12 23:40:59 -06:00
075811982d
Update ci.yml 2025-06-12 23:40:16 -06:00
aa01d74c01
Update ci.yml 2025-06-12 23:38:29 -06:00
ae45cc898d
Update ci.yml 2025-06-12 23:25:00 -06:00
890742b177
Update ci.yml 2025-06-12 23:20:05 -06:00
d0e55d3706
Update ci.yml 2025-06-12 23:10:37 -06:00
b5ee8dc408
Update ci.yml 2025-06-12 22:53:57 -06:00
dbdab08c7a
Update pyproject.toml v0.4.2 2025-06-12 21:28:42 -06:00
a3568f1287
Update __init__.py 2025-06-12 21:28:29 -06:00
c146b01cec
fix: declare public exports (#75) 2025-06-12 21:27:37 -06:00
c87bcefd41
Add moderation bot example (#74) 2025-06-12 13:39:13 -06:00
8e48da3bee
Add async context manager to VoiceClient (#67)
Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
2025-06-11 18:24:22 -06:00