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.
@@ -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.pop(message_id, None)
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
- from .errors import (
23
- CommandError,
24
- CommandNotFound,
25
- BadArgument,
26
- MissingRequiredArgument,
27
- ArgumentParsingError,
28
- CheckFailure,
29
- CheckAnyFailure,
30
- CommandOnCooldown,
31
- CommandInvokeError,
32
- MaxConcurrencyReached,
33
- )
34
-
35
- __all__ = [
36
- # Cog
37
- "Cog",
38
- # Core
39
- "Command",
40
- "CommandContext",
41
- # "CommandHandler", # Usually not part of public API for direct use by bot devs
42
- # Decorators
43
- "command",
44
- "listener",
45
- "check",
46
- "check_any",
47
- "cooldown",
48
- "max_concurrency",
49
- "requires_permissions",
50
- # Errors
51
- "CommandError",
52
- "CommandNotFound",
53
- "BadArgument",
54
- "MissingRequiredArgument",
55
- "ArgumentParsingError",
56
- "CheckFailure",
57
- "CheckAnyFailure",
58
- "CommandOnCooldown",
59
- "CommandInvokeError",
60
- "MaxConcurrencyReached",
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
+ ]