dshellInterpreter 1.2.0.18__tar.gz → 1.2.0.20__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.
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_interaction.py +5 -5
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_member.py +11 -13
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/dshell_interpreter.py +1 -1
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellParser/ast_nodes.py +1 -1
- {dshellinterpreter-1.2.0.18/dshellInterpreter.egg-info → dshellinterpreter-1.2.0.20}/PKG-INFO +1 -1
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20/dshellInterpreter.egg-info}/PKG-INFO +1 -1
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/setup.py +1 -1
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_channel.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_embed.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_file.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_message.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_ui.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_embed.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_file.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_global.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_list.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_member.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_numbers.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_permissions.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_string.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/utils_type_validation.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/__init__.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/cached_messages.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/dshell_arguments.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/dshell_global_variables.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/dshell_scope.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/errors.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/utils_interpreter.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellParser/__init__.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellParser/dshell_parser.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellParser/errors.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellPreProcess/__init__.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellPreProcess/dshell_preprocess.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellTokenizer/__init__.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellTokenizer/dshell_keywords.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellTokenizer/dshell_token_type.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellTokenizer/dshell_tokenizer.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/__init__.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/full_import.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/regex_test.py +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/LICENSE +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/README.md +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/dshellInterpreter.egg-info/requires.txt +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/dshellInterpreter.egg-info/top_level.txt +0 -0
- {dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/setup.cfg +0 -0
|
@@ -9,7 +9,7 @@ from pycordViews import EasyModifiedViews
|
|
|
9
9
|
from Dshell.full_import import (Interaction,
|
|
10
10
|
Embed, Optional, File, Union)
|
|
11
11
|
|
|
12
|
-
from ..DshellParser.ast_nodes import ListNode, FileNode, StrNode, BoolNode, IntNode
|
|
12
|
+
from ..DshellParser.ast_nodes import ListNode, FileNode, StrNode, BoolNode, IntNode, FloatNode
|
|
13
13
|
from .utils.utils_message import utils_autorised_mentions
|
|
14
14
|
from .utils.utils_file import utils_check_files_arguments
|
|
15
15
|
from .utils.utils_embed import utils_check_embeds_arguments
|
|
@@ -22,7 +22,7 @@ from .utils.utils_type_validation import (_validate_optional_number,
|
|
|
22
22
|
|
|
23
23
|
async def dshell_respond_interaction(ctx: Interaction,
|
|
24
24
|
content: Optional[StrNode] = None,
|
|
25
|
-
delete=None,
|
|
25
|
+
delete:Optional[Union[IntNode, FloatNode]]=None,
|
|
26
26
|
global_mentions: Optional[BoolNode] = None,
|
|
27
27
|
everyone_mention: BoolNode = BoolNode(1),
|
|
28
28
|
roles_mentions: BoolNode = BoolNode(1),
|
|
@@ -31,7 +31,7 @@ async def dshell_respond_interaction(ctx: Interaction,
|
|
|
31
31
|
hide: BoolNode = BoolNode(0),
|
|
32
32
|
embeds: Optional[ListNode]=None,
|
|
33
33
|
files: Optional[Union[ListNode, FileNode]] = None,
|
|
34
|
-
view: Optional[EasyModifiedViews]=None) ->
|
|
34
|
+
view: Optional[EasyModifiedViews]=None) -> IntNode:
|
|
35
35
|
"""
|
|
36
36
|
Répond à une interaction Discord avec un message.
|
|
37
37
|
|
|
@@ -109,7 +109,7 @@ async def dshell_respond_interaction(ctx: Interaction,
|
|
|
109
109
|
|
|
110
110
|
return IntNode(sended_message.id)
|
|
111
111
|
|
|
112
|
-
async def dshell_defer_interaction(ctx: Interaction) ->
|
|
112
|
+
async def dshell_defer_interaction(ctx: Interaction) -> BoolNode:
|
|
113
113
|
"""
|
|
114
114
|
Diffère la réponse d'une interaction Discord.
|
|
115
115
|
|
|
@@ -135,7 +135,7 @@ async def dshell_defer_interaction(ctx: Interaction) -> bool:
|
|
|
135
135
|
|
|
136
136
|
return BoolNode(1)
|
|
137
137
|
|
|
138
|
-
async def dshell_delete_original_message(ctx: Interaction) ->
|
|
138
|
+
async def dshell_delete_original_message(ctx: Interaction) -> IntNode:
|
|
139
139
|
"""
|
|
140
140
|
Supprime le message original d'une interaction Discord.
|
|
141
141
|
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_member.py
RENAMED
|
@@ -42,7 +42,7 @@ async def dshell_send_private_message(ctx: Message,
|
|
|
42
42
|
message: Optional[StrNode] = None,
|
|
43
43
|
member: Optional[IntNode] = None,
|
|
44
44
|
delete: Optional[IntNode]= None,
|
|
45
|
-
embeds: Optional[ListNode, EmbedNode] = None,
|
|
45
|
+
embeds: Optional[Union[ListNode, EmbedNode]] = None,
|
|
46
46
|
files: Optional[Union[ListNode, FileNode]] = None):
|
|
47
47
|
"""
|
|
48
48
|
Envoie un message privé à un membre Discord.
|
|
@@ -256,8 +256,7 @@ async def dshell_timeout_member(ctx: Message, duration: IntNode, member: Optiona
|
|
|
256
256
|
if not target_member:
|
|
257
257
|
raise Exception(f'Member {member} not found in the server !')
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
raise TypeError("Duration must be an integer representing seconds.")
|
|
259
|
+
_validate_required_int(duration, "duration", _CMD)
|
|
261
260
|
|
|
262
261
|
if duration < 0:
|
|
263
262
|
raise ValueError("Duration must be a non-negative integer.")
|
|
@@ -304,7 +303,7 @@ async def dshell_rename_member(ctx: Message, new_name: StrNode, member: Optional
|
|
|
304
303
|
return IntNode(renamed_member.id)
|
|
305
304
|
|
|
306
305
|
|
|
307
|
-
async def dshell_check_permissions(ctx: Message, permissions:
|
|
306
|
+
async def dshell_check_permissions(ctx: Message, permissions: IntNode, member: Optional[IntNode]=None):
|
|
308
307
|
"""
|
|
309
308
|
Vérifie si un membre possède des permissions spécifiques sur le serveur.
|
|
310
309
|
|
|
@@ -332,19 +331,18 @@ async def dshell_check_permissions(ctx: Message, permissions: PermissionNode, me
|
|
|
332
331
|
_validate_required_int(permissions, "Permissions", _CMD)
|
|
333
332
|
_validate_optional_int(member, "Member", _CMD)
|
|
334
333
|
|
|
335
|
-
target_member: Member = ctx.author if member is None else ctx.channel.guild.get_member(member)
|
|
334
|
+
target_member: Optional[Member] = ctx.author if member is None else ctx.channel.guild.get_member(member)
|
|
336
335
|
|
|
337
336
|
if not target_member:
|
|
338
337
|
raise Exception(f'Member {member} not found in the server !')
|
|
339
338
|
|
|
340
|
-
|
|
341
|
-
raise TypeError("Permissions must be an integer representing permissions flags.")
|
|
339
|
+
_validate_required_int(permissions, "permissions", _CMD)
|
|
342
340
|
|
|
343
341
|
permissions_to_check = Permissions(permissions)
|
|
344
342
|
member_permissions = target_member.guild_permissions
|
|
345
343
|
|
|
346
|
-
if (permissions_to_check
|
|
347
|
-
return
|
|
344
|
+
if (permissions_to_check & member_permissions) != 0:
|
|
345
|
+
return BoolNode(1)
|
|
348
346
|
return BoolNode(0)
|
|
349
347
|
|
|
350
348
|
|
|
@@ -452,7 +450,7 @@ async def dshell_give_member_roles(ctx: Message,
|
|
|
452
450
|
if target_member is None:
|
|
453
451
|
raise Exception(f'Member {member} not found in the server !')
|
|
454
452
|
|
|
455
|
-
if isinstance(roles,
|
|
453
|
+
if isinstance(roles, IntNode):
|
|
456
454
|
roles = (roles, )
|
|
457
455
|
|
|
458
456
|
list_roles: list[Role] = []
|
|
@@ -466,7 +464,7 @@ async def dshell_give_member_roles(ctx: Message,
|
|
|
466
464
|
|
|
467
465
|
list_roles.extend(target_member.roles)
|
|
468
466
|
|
|
469
|
-
await target_member.edit(roles=list_roles, reason=
|
|
467
|
+
await target_member.edit(roles=list_roles, reason=reason)
|
|
470
468
|
|
|
471
469
|
return IntNode(target_member.id)
|
|
472
470
|
|
|
@@ -513,7 +511,7 @@ async def dshell_remove_member_roles(ctx: Message,
|
|
|
513
511
|
if target_member is None:
|
|
514
512
|
raise Exception(f'Member {member} not found in the server !')
|
|
515
513
|
|
|
516
|
-
if isinstance(roles,
|
|
514
|
+
if isinstance(roles, IntNode):
|
|
517
515
|
roles = (roles,)
|
|
518
516
|
|
|
519
517
|
list_roles: set[Role] = set()
|
|
@@ -527,6 +525,6 @@ async def dshell_remove_member_roles(ctx: Message,
|
|
|
527
525
|
|
|
528
526
|
new_set_role = list(set(target_member.roles) - list_roles)
|
|
529
527
|
|
|
530
|
-
await target_member.edit(roles=new_set_role, reason=
|
|
528
|
+
await target_member.edit(roles=new_set_role, reason=reason)
|
|
531
529
|
|
|
532
530
|
return IntNode(target_member.id)
|
|
@@ -187,7 +187,7 @@ class DshellInterpreteur:
|
|
|
187
187
|
self.env.set(node.name.value, ListNode([await build_ui(first_node, self)])) # store UIs in a list
|
|
188
188
|
|
|
189
189
|
elif isinstance(first_node, CodeNode):
|
|
190
|
-
if self.env.contains(node.name.value) and isinstance(self.env.get(node.name.value),
|
|
190
|
+
if self.env.contains(node.name.value) and isinstance(self.env.get(node.name.value), CodeNode):
|
|
191
191
|
self.env.get(node.name.value).update(first_node)
|
|
192
192
|
else:
|
|
193
193
|
self.env.set(node.name.value, first_node)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from Dshell.full_import import (Any, randint, Optional, Union, Embed, Member, Role, PermissionOverwrite, getsizeof)
|
|
1
|
+
from Dshell.full_import import (Any, randint, Optional, Union, Embed, Member, Role, PermissionOverwrite, getsizeof, Permissions)
|
|
2
2
|
from ..DshellTokenizer.dshell_token_type import Token
|
|
3
3
|
from ..DshellInterpreteur.dshell_global_variables import MAX_STR_SIZE, MAX_LIST_SIZE, MAX_FILE_SIZE
|
|
4
4
|
from .errors import *
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="dshellInterpreter",
|
|
8
|
-
version="1.2.0.
|
|
8
|
+
version="1.2.0.20",
|
|
9
9
|
author="Chronos",
|
|
10
10
|
author_email="vagabonwalybi@gmail.com",
|
|
11
11
|
description="A Discord bot interpreter for creating custom commands and automations.",
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_channel.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_embed.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_file.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_message.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_role.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/dshell_ui.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DISCORD_COMMANDS/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/dshell_scope.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellInterpreteur/errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellParser/dshell_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellPreProcess/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellTokenizer/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellTokenizer/dshell_keywords.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/Dshell/DshellTokenizer/dshell_tokenizer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/dshellInterpreter.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/dshellInterpreter.egg-info/requires.txt
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.18 → dshellinterpreter-1.2.0.20}/dshellInterpreter.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|