dshellInterpreter 0.1.8__py3-none-any.whl → 0.1.10__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.
Potentially problematic release.
This version of dshellInterpreter might be problematic. Click here for more details.
- Dshell/DISCORD_COMMANDS/dshell_message.py +0 -1
- Dshell/_DshellInterpreteur/dshell_interpreter.py +10 -7
- Dshell/_DshellParser/ast_nodes.py +1 -2
- {dshellinterpreter-0.1.8.dist-info → dshellinterpreter-0.1.10.dist-info}/METADATA +1 -1
- {dshellinterpreter-0.1.8.dist-info → dshellinterpreter-0.1.10.dist-info}/RECORD +8 -8
- {dshellinterpreter-0.1.8.dist-info → dshellinterpreter-0.1.10.dist-info}/WHEEL +0 -0
- {dshellinterpreter-0.1.8.dist-info → dshellinterpreter-0.1.10.dist-info}/licenses/LICENSE +0 -0
- {dshellinterpreter-0.1.8.dist-info → dshellinterpreter-0.1.10.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from asyncio import sleep
|
|
2
2
|
from re import findall
|
|
3
3
|
from typing import TypeVar, Union, Any, Optional, Callable
|
|
4
|
+
from logging import Logger
|
|
5
|
+
|
|
4
6
|
|
|
5
7
|
from discord import AutoShardedBot, Embed, Colour, PermissionOverwrite, Permissions, Guild, Member, Role
|
|
6
8
|
from discord.abc import GuildChannel, PrivateChannel
|
|
@@ -272,7 +274,7 @@ def build_permission(body: list[Token], interpreter: DshellInterpreteur) -> dict
|
|
|
272
274
|
i.pop('*')
|
|
273
275
|
permissions.update(DshellPermissions(i).get_permission_overwrite(interpreter.ctx.guild))
|
|
274
276
|
|
|
275
|
-
|
|
277
|
+
return permissions
|
|
276
278
|
|
|
277
279
|
|
|
278
280
|
class DshellIterator:
|
|
@@ -288,7 +290,6 @@ class DshellIterator:
|
|
|
288
290
|
return self
|
|
289
291
|
|
|
290
292
|
def __next__(self):
|
|
291
|
-
|
|
292
293
|
if self.current >= len(self.data):
|
|
293
294
|
self.current = 0
|
|
294
295
|
raise StopIteration
|
|
@@ -373,21 +374,23 @@ class DshellPermissions:
|
|
|
373
374
|
target_keys = self.target.keys()
|
|
374
375
|
|
|
375
376
|
if 'members' in target_keys:
|
|
376
|
-
for member_id in
|
|
377
|
+
for member_id in (
|
|
378
|
+
self.target['members'] if isinstance(self.target['members'], ListNode) else [self.target['members']]): # accepte un seul ID
|
|
377
379
|
member = self.get_member(guild, member_id)
|
|
378
380
|
permissions[member] = PermissionOverwrite.from_pair(
|
|
379
381
|
allow=Permissions(permissions=self.target.get('allow', 0)),
|
|
380
|
-
deny=
|
|
382
|
+
deny=Permissions(permissions=self.target.get('deny', 0))
|
|
381
383
|
)
|
|
382
384
|
|
|
383
385
|
elif 'roles' in target_keys:
|
|
384
|
-
for role_id in
|
|
386
|
+
for role_id in (
|
|
387
|
+
self.target['roles'] if isinstance(self.target['roles'], ListNode) else [self.target['roles']]): ## accepte un seul ID
|
|
385
388
|
role = self.get_role(guild, role_id)
|
|
386
389
|
permissions[role] = PermissionOverwrite.from_pair(
|
|
387
390
|
allow=Permissions(permissions=self.target.get('allow', 0)),
|
|
388
|
-
deny=
|
|
391
|
+
deny=Permissions(permissions=self.target.get('deny', 0))
|
|
389
392
|
)
|
|
390
393
|
else:
|
|
391
394
|
raise ValueError("Aucun membre ou rôle spécifié dans les permissions.")
|
|
392
395
|
|
|
393
|
-
return permissions
|
|
396
|
+
return permissions
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
Dshell/__init__.py,sha256=UPvXnewe_8FX9aoevMA78UN1k8AY-u8LTY3vEVxaDxw,72
|
|
2
2
|
Dshell/DISCORD_COMMANDS/__init__.py,sha256=s58iMazDXNPDLZ3Hvymh__C5w7lcgEvaYfX0-SHocRo,62
|
|
3
3
|
Dshell/DISCORD_COMMANDS/dshell_channel.py,sha256=RmzqXiuwWTbIUV37KtutFsw2uuXNY7HJFtbJCut5rgg,2388
|
|
4
|
-
Dshell/DISCORD_COMMANDS/dshell_message.py,sha256=
|
|
4
|
+
Dshell/DISCORD_COMMANDS/dshell_message.py,sha256=cOZzPbm4wkgObuIL42CH1R3qDhPP8ONiP4BA-XTfAMc,1880
|
|
5
5
|
Dshell/_DshellInterpreteur/__init__.py,sha256=xy5-J-R3YmY99JF3NBHTRRLsComFxpjnCA5xacISctU,35
|
|
6
|
-
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=
|
|
6
|
+
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=V9sF_2k7JU25yS7n2Ms95fMsjV-pCQy6eCCMu74ilVA,16113
|
|
7
7
|
Dshell/_DshellParser/__init__.py,sha256=ONDfhZMvClqP_6tE8SLjp-cf3pXL-auQYnfYRrHZxC4,56
|
|
8
|
-
Dshell/_DshellParser/ast_nodes.py,sha256=
|
|
8
|
+
Dshell/_DshellParser/ast_nodes.py,sha256=dRAYD7ZgNB6q5RGwqgWrM68PtUzSFGMBb6xEwvzaDxo,5687
|
|
9
9
|
Dshell/_DshellParser/dshell_parser.py,sha256=mA8uA-xBhKcfnSKfLfePwI_fD0GrHbj0VBVeJPbcGas,13956
|
|
10
10
|
Dshell/_DshellTokenizer/__init__.py,sha256=LIQSRhDx2B9pmPx5ADMwwD0Xr9ybneVLhHH8qrJWw_s,172
|
|
11
11
|
Dshell/_DshellTokenizer/dshell_keywords.py,sha256=wTV89px9bUY4uf0KCnDr356H_dBIVgcPr55L_6-AWdg,3661
|
|
12
12
|
Dshell/_DshellTokenizer/dshell_token_type.py,sha256=NE-sVloBYtioZpWKnWuO5p0YcObGJZPNaKwc8lWDonQ,999
|
|
13
13
|
Dshell/_DshellTokenizer/dshell_tokenizer.py,sha256=2tto_gXYj94fLFx99p6nBbtplALT3Ysz9oBwatX9tIA,5788
|
|
14
|
-
dshellinterpreter-0.1.
|
|
15
|
-
dshellinterpreter-0.1.
|
|
16
|
-
dshellinterpreter-0.1.
|
|
17
|
-
dshellinterpreter-0.1.
|
|
18
|
-
dshellinterpreter-0.1.
|
|
14
|
+
dshellinterpreter-0.1.10.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
|
|
15
|
+
dshellinterpreter-0.1.10.dist-info/METADATA,sha256=1DKZzK2v6ED7iMaKg7H3CLNG4qf62niR3wfBT8_-xbU,1096
|
|
16
|
+
dshellinterpreter-0.1.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
dshellinterpreter-0.1.10.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
|
|
18
|
+
dshellinterpreter-0.1.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|