ezytools 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ezytools-0.2.0 → ezytools-0.3.0}/PKG-INFO +43 -1
- {ezytools-0.2.0 → ezytools-0.3.0}/README.md +484 -442
- {ezytools-0.2.0 → ezytools-0.3.0}/pyproject.toml +16 -16
- {ezytools-0.2.0 → ezytools-0.3.0}/src/ezytools/__init__.py +5 -5
- {ezytools-0.2.0 → ezytools-0.3.0}/src/ezytools/core.py +1298 -1172
- ezytools-0.3.0/tests/test_voice.py +61 -0
- {ezytools-0.2.0 → ezytools-0.3.0}/LICENSE +0 -0
- {ezytools-0.2.0 → ezytools-0.3.0}/examples/yapper_bot.py +0 -0
- {ezytools-0.2.0 → ezytools-0.3.0}/tests/test_botkit.py +0 -0
- {ezytools-0.2.0 → ezytools-0.3.0}/tests/test_developer.py +0 -0
- {ezytools-0.2.0 → ezytools-0.3.0}/tests/test_workflows.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: ezytools
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A Python utility library for Yapper bot developers
|
|
5
5
|
License-Expression: LicenseRef-Proprietary
|
|
6
6
|
License-File: LICENSE
|
|
@@ -451,3 +451,45 @@ Ezytools is a developing Python utility library focused on making bot developmen
|
|
|
451
451
|
More utilities can be added as the library develops.
|
|
452
452
|
|
|
453
453
|
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
## Voice shortcuts — 0.3.0
|
|
457
|
+
|
|
458
|
+
Requires a Yapper SDK exposing `voice`, `move_member`, `disconnect_member`,
|
|
459
|
+
`join_voice`, `leave_voice`, and (for audio) `connect_voice`.
|
|
460
|
+
Existing utilities remain available. Implementations stay in `src/ezytools/core.py`.
|
|
461
|
+
|
|
462
|
+
```python
|
|
463
|
+
import ezytools as e
|
|
464
|
+
|
|
465
|
+
members = e.voice_members(bot, server_id, channel_id)
|
|
466
|
+
count = e.voice_member_count(bot, server_id, channel_id)
|
|
467
|
+
current = e.member_voice_channel(bot, server_id, user_id) # ID or None
|
|
468
|
+
present = e.is_in_voice(bot, server_id, user_id)
|
|
469
|
+
snapshot = e.voice_channels(bot, server_id)
|
|
470
|
+
|
|
471
|
+
# Authorise the command user first (e.g. command_guard / require_roles).
|
|
472
|
+
e.move_member(bot, server_id, user_id, destination_channel_id)
|
|
473
|
+
e.disconnect_member(bot, server_id, user_id)
|
|
474
|
+
e.move_members(bot, server_id, [user_id, other_id], destination_channel_id)
|
|
475
|
+
e.disconnect_members(bot, server_id, [user_id, other_id])
|
|
476
|
+
|
|
477
|
+
# A ticket alone does not connect audio; do not log its secret fields.
|
|
478
|
+
ticket = e.join_voice(bot, server_id, channel_id)
|
|
479
|
+
e.leave_voice(bot, server_id)
|
|
480
|
+
|
|
481
|
+
# Inside an async function, with SDK audio dependencies installed:
|
|
482
|
+
call = await e.connect_voice(bot, server_id, channel_id)
|
|
483
|
+
try:
|
|
484
|
+
pass # Use the SDK call.source to supply audio frames.
|
|
485
|
+
finally:
|
|
486
|
+
await call.leave()
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
Moving requires a member already connected to voice; helpers cannot force
|
|
490
|
+
someone to join a call. Server permissions and SDK errors still apply.
|
|
491
|
+
Bulk actions validate all IDs first and deduplicate them; execution stops at
|
|
492
|
+
the first failure, leaving earlier successful actions applied. Respect platform
|
|
493
|
+
rate limits; there are no automatic retries or background moderation actions.
|
|
494
|
+
Voice snapshots can change between lookup and action. Audio connections require
|
|
495
|
+
the Yapper SDK's optional `livekit` and `cryptography` dependencies.
|