disagreement 0.2.0rc1__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
- disagreement/__init__.py +2 -4
- disagreement/audio.py +42 -5
- disagreement/cache.py +43 -4
- disagreement/caching.py +121 -0
- disagreement/client.py +1682 -1535
- disagreement/enums.py +10 -3
- disagreement/error_handler.py +5 -1
- disagreement/errors.py +1341 -3
- disagreement/event_dispatcher.py +3 -5
- disagreement/ext/__init__.py +1 -0
- disagreement/ext/app_commands/__init__.py +0 -2
- disagreement/ext/app_commands/commands.py +0 -2
- disagreement/ext/app_commands/context.py +0 -2
- disagreement/ext/app_commands/converters.py +2 -4
- disagreement/ext/app_commands/decorators.py +5 -7
- disagreement/ext/app_commands/handler.py +1 -3
- disagreement/ext/app_commands/hybrid.py +0 -2
- disagreement/ext/commands/__init__.py +63 -61
- disagreement/ext/commands/cog.py +0 -2
- disagreement/ext/commands/converters.py +16 -5
- disagreement/ext/commands/core.py +728 -563
- disagreement/ext/commands/decorators.py +294 -219
- disagreement/ext/commands/errors.py +0 -2
- disagreement/ext/commands/help.py +0 -2
- disagreement/ext/commands/view.py +1 -3
- disagreement/gateway.py +632 -586
- disagreement/http.py +1362 -1041
- disagreement/interactions.py +0 -2
- disagreement/models.py +2682 -2263
- disagreement/shard_manager.py +0 -2
- disagreement/ui/view.py +167 -165
- disagreement/voice_client.py +263 -162
- {disagreement-0.2.0rc1.dist-info → disagreement-0.4.0.dist-info}/METADATA +33 -6
- disagreement-0.4.0.dist-info/RECORD +55 -0
- disagreement-0.2.0rc1.dist-info/RECORD +0 -54
- {disagreement-0.2.0rc1.dist-info → disagreement-0.4.0.dist-info}/WHEEL +0 -0
- {disagreement-0.2.0rc1.dist-info → disagreement-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {disagreement-0.2.0rc1.dist-info → disagreement-0.4.0.dist-info}/top_level.txt +0 -0
disagreement/enums.py
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
# disagreement/enums.py
|
2
|
-
|
3
1
|
"""
|
4
2
|
Enums for Discord constants.
|
5
3
|
"""
|
6
4
|
|
7
|
-
from enum import IntEnum, Enum
|
5
|
+
from enum import IntEnum, Enum
|
8
6
|
|
9
7
|
|
10
8
|
class GatewayOpcode(IntEnum):
|
@@ -375,6 +373,15 @@ class OverwriteType(IntEnum):
|
|
375
373
|
MEMBER = 1
|
376
374
|
|
377
375
|
|
376
|
+
class AutoArchiveDuration(IntEnum):
|
377
|
+
"""Thread auto-archive duration in minutes."""
|
378
|
+
|
379
|
+
HOUR = 60
|
380
|
+
DAY = 1440
|
381
|
+
THREE_DAYS = 4320
|
382
|
+
WEEK = 10080
|
383
|
+
|
384
|
+
|
378
385
|
# --- Component Enums ---
|
379
386
|
|
380
387
|
|
disagreement/error_handler.py
CHANGED
@@ -14,7 +14,11 @@ def setup_global_error_handler(
|
|
14
14
|
The handler logs unhandled exceptions so they don't crash the bot.
|
15
15
|
"""
|
16
16
|
if loop is None:
|
17
|
-
|
17
|
+
try:
|
18
|
+
loop = asyncio.get_running_loop()
|
19
|
+
except RuntimeError:
|
20
|
+
loop = asyncio.new_event_loop()
|
21
|
+
asyncio.set_event_loop(loop)
|
18
22
|
|
19
23
|
if not logging.getLogger().hasHandlers():
|
20
24
|
setup_logging(logging.ERROR)
|