disagreement 0.2.0rc1__py3-none-any.whl → 0.3.0b1__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 +1 -1
- disagreement/audio.py +17 -0
- disagreement/cache.py +31 -1
- disagreement/caching.py +120 -0
- disagreement/client.py +1658 -1545
- disagreement/event_dispatcher.py +2 -2
- disagreement/ext/commands/__init__.py +65 -61
- disagreement/ext/commands/core.py +690 -563
- disagreement/ext/commands/decorators.py +298 -219
- disagreement/gateway.py +630 -586
- disagreement/http.py +1120 -1041
- disagreement/models.py +2588 -2263
- disagreement/ui/view.py +167 -165
- disagreement/voice_client.py +244 -162
- {disagreement-0.2.0rc1.dist-info → disagreement-0.3.0b1.dist-info}/METADATA +2 -1
- {disagreement-0.2.0rc1.dist-info → disagreement-0.3.0b1.dist-info}/RECORD +19 -18
- {disagreement-0.2.0rc1.dist-info → disagreement-0.3.0b1.dist-info}/WHEEL +0 -0
- {disagreement-0.2.0rc1.dist-info → disagreement-0.3.0b1.dist-info}/licenses/LICENSE +0 -0
- {disagreement-0.2.0rc1.dist-info → disagreement-0.3.0b1.dist-info}/top_level.txt +0 -0
disagreement/event_dispatcher.py
CHANGED
@@ -76,7 +76,7 @@ class EventDispatcher:
|
|
76
76
|
"""Parses MESSAGE_DELETE and updates message cache."""
|
77
77
|
message_id = data.get("id")
|
78
78
|
if message_id:
|
79
|
-
self._client._messages.
|
79
|
+
self._client._messages.invalidate(message_id)
|
80
80
|
return data
|
81
81
|
|
82
82
|
def _parse_message_reaction_raw(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
@@ -124,7 +124,7 @@ class EventDispatcher:
|
|
124
124
|
"""Parses GUILD_MEMBER_ADD into a Member object."""
|
125
125
|
|
126
126
|
guild_id = str(data.get("guild_id"))
|
127
|
-
return self._client.parse_member(data, guild_id)
|
127
|
+
return self._client.parse_member(data, guild_id, just_joined=True)
|
128
128
|
|
129
129
|
def _parse_guild_member_remove(self, data: Dict[str, Any]):
|
130
130
|
"""Parses GUILD_MEMBER_REMOVE into a GuildMemberRemove model."""
|
@@ -1,61 +1,65 @@
|
|
1
|
-
# disagreement/ext/commands/__init__.py
|
2
|
-
|
3
|
-
"""
|
4
|
-
disagreement.ext.commands - A command framework extension for the Disagreement library.
|
5
|
-
"""
|
6
|
-
|
7
|
-
from .cog import Cog
|
8
|
-
from .core import (
|
9
|
-
Command,
|
10
|
-
CommandContext,
|
11
|
-
CommandHandler,
|
12
|
-
) # CommandHandler might be internal
|
13
|
-
from .decorators import (
|
14
|
-
command,
|
15
|
-
listener,
|
16
|
-
check,
|
17
|
-
check_any,
|
18
|
-
cooldown,
|
19
|
-
max_concurrency,
|
20
|
-
requires_permissions,
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
#
|
39
|
-
"
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
"
|
44
|
-
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
50
|
-
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
54
|
-
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
61
|
-
|
1
|
+
# disagreement/ext/commands/__init__.py
|
2
|
+
|
3
|
+
"""
|
4
|
+
disagreement.ext.commands - A command framework extension for the Disagreement library.
|
5
|
+
"""
|
6
|
+
|
7
|
+
from .cog import Cog
|
8
|
+
from .core import (
|
9
|
+
Command,
|
10
|
+
CommandContext,
|
11
|
+
CommandHandler,
|
12
|
+
) # CommandHandler might be internal
|
13
|
+
from .decorators import (
|
14
|
+
command,
|
15
|
+
listener,
|
16
|
+
check,
|
17
|
+
check_any,
|
18
|
+
cooldown,
|
19
|
+
max_concurrency,
|
20
|
+
requires_permissions,
|
21
|
+
has_role,
|
22
|
+
has_any_role,
|
23
|
+
)
|
24
|
+
from .errors import (
|
25
|
+
CommandError,
|
26
|
+
CommandNotFound,
|
27
|
+
BadArgument,
|
28
|
+
MissingRequiredArgument,
|
29
|
+
ArgumentParsingError,
|
30
|
+
CheckFailure,
|
31
|
+
CheckAnyFailure,
|
32
|
+
CommandOnCooldown,
|
33
|
+
CommandInvokeError,
|
34
|
+
MaxConcurrencyReached,
|
35
|
+
)
|
36
|
+
|
37
|
+
__all__ = [
|
38
|
+
# Cog
|
39
|
+
"Cog",
|
40
|
+
# Core
|
41
|
+
"Command",
|
42
|
+
"CommandContext",
|
43
|
+
# "CommandHandler", # Usually not part of public API for direct use by bot devs
|
44
|
+
# Decorators
|
45
|
+
"command",
|
46
|
+
"listener",
|
47
|
+
"check",
|
48
|
+
"check_any",
|
49
|
+
"cooldown",
|
50
|
+
"max_concurrency",
|
51
|
+
"requires_permissions",
|
52
|
+
"has_role",
|
53
|
+
"has_any_role",
|
54
|
+
# Errors
|
55
|
+
"CommandError",
|
56
|
+
"CommandNotFound",
|
57
|
+
"BadArgument",
|
58
|
+
"MissingRequiredArgument",
|
59
|
+
"ArgumentParsingError",
|
60
|
+
"CheckFailure",
|
61
|
+
"CheckAnyFailure",
|
62
|
+
"CommandOnCooldown",
|
63
|
+
"CommandInvokeError",
|
64
|
+
"MaxConcurrencyReached",
|
65
|
+
]
|