ezytools 0.2.0__tar.gz → 0.3.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ezytools
3
- Version: 0.2.0
3
+ Version: 0.3.1
4
4
  Summary: A Python utility library for Yapper bot developers
5
5
  License-Expression: LicenseRef-Proprietary
6
6
  License-File: LICENSE
@@ -17,6 +17,73 @@ All implementation lives in `src/ezytools/core.py`. The package initializer only
17
17
  re-exports it. Install with `python -m pip install .`, or copy `core.py` into your
18
18
  bot folder as `ezytools.py` to use it as a standalone file.
19
19
 
20
+ ## What's new
21
+
22
+ **0.3.1 — documentation update:** voice documentation is now near the top,
23
+ with navigation links below. No runtime behavior changed from 0.3.0.
24
+
25
+ **Added in 0.3.0:** 12 voice helpers for moving/disconnecting members,
26
+ bulk actions, voice membership lookups, and bot voice connections.
27
+
28
+ ```shell
29
+ python -m pip install --upgrade ezytools
30
+ ```
31
+
32
+ ## Documentation
33
+
34
+ - [Voice shortcuts and examples](#voice-shortcuts)
35
+ - [Member, role, and channel workflows](#workflows)
36
+ - [Bot-building helpers](#bot-building)
37
+ - [Developer utilities](#developer-utilities)
38
+ - [Moderation utilities](#moderation-utilities)
39
+ - [License](https://github.com/Adecode-23/ezytools/blob/main/LICENSE)
40
+
41
+ <a id="voice-shortcuts"></a>
42
+
43
+ ## Voice shortcuts
44
+
45
+
46
+ Requires a Yapper SDK exposing `voice`, `move_member`, `disconnect_member`,
47
+ `join_voice`, `leave_voice`, and (for audio) `connect_voice`.
48
+ Existing utilities remain available. Implementations stay in `src/ezytools/core.py`.
49
+
50
+ ```python
51
+ import ezytools as e
52
+
53
+ members = e.voice_members(bot, server_id, channel_id)
54
+ count = e.voice_member_count(bot, server_id, channel_id)
55
+ current = e.member_voice_channel(bot, server_id, user_id) # ID or None
56
+ present = e.is_in_voice(bot, server_id, user_id)
57
+ snapshot = e.voice_channels(bot, server_id)
58
+
59
+ # Authorise the command user first (e.g. command_guard / require_roles).
60
+ e.move_member(bot, server_id, user_id, destination_channel_id)
61
+ e.disconnect_member(bot, server_id, user_id)
62
+ e.move_members(bot, server_id, [user_id, other_id], destination_channel_id)
63
+ e.disconnect_members(bot, server_id, [user_id, other_id])
64
+
65
+ # A ticket alone does not connect audio; do not log its secret fields.
66
+ ticket = e.join_voice(bot, server_id, channel_id)
67
+ e.leave_voice(bot, server_id)
68
+
69
+ # Inside an async function, with SDK audio dependencies installed:
70
+ call = await e.connect_voice(bot, server_id, channel_id)
71
+ try:
72
+ pass # Use the SDK call.source to supply audio frames.
73
+ finally:
74
+ await call.leave()
75
+ ```
76
+
77
+ Moving requires a member already connected to voice; helpers cannot force
78
+ someone to join a call. Server permissions and SDK errors still apply.
79
+ Bulk actions validate all IDs first and deduplicate them; execution stops at
80
+ the first failure, leaving earlier successful actions applied. Respect platform
81
+ rate limits; there are no automatic retries or background moderation actions.
82
+ Voice snapshots can change between lookup and action. Audio connections require
83
+ the Yapper SDK's optional `livekit` and `cryptography` dependencies.
84
+
85
+ <a id="workflows"></a>
86
+
20
87
  ## Faster workflows inside your handlers
21
88
 
22
89
  You write the command, decide who can run it, handle missing data, and choose the
@@ -75,6 +142,8 @@ or expression evaluation; supplied mentions and Markdown stay active.
75
142
  `msg.argv`. For strict quote validation with usage feedback, use
76
143
  `command_arguments(msg, ...)` instead.
77
144
 
145
+ <a id="bot-building"></a>
146
+
78
147
  ## Yapper bot-building helpers
79
148
 
80
149
  These helpers use the synchronous Yapper SDK's command, event, member, role,
@@ -149,6 +218,8 @@ Help reads the command list when invoked, so later commands appear automatically
149
218
  `hidden=["internal"]` hides names from help only; guards enforce access.
150
219
  See [the runnable example](examples/yapper_bot.py) for environment-based setup.
151
220
 
221
+ <a id="developer-utilities"></a>
222
+
152
223
  ## Developer utilities
153
224
 
154
225
  Install the package from this checkout (Python 3.10+):
@@ -283,6 +354,8 @@ your-project/
283
354
  import ezytools
284
355
  ```
285
356
 
357
+ <a id="moderation-utilities"></a>
358
+
286
359
  ## 🛡️ Moderation Utilities
287
360
 
288
361
  Ezytools currently provides these moderation helpers:
@@ -451,3 +524,5 @@ Ezytools is a developing Python utility library focused on making bot developmen
451
524
  More utilities can be added as the library develops.
452
525
 
453
526
 
527
+
528
+