dshellInterpreter 1.2.0.14__tar.gz → 1.2.0.16__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.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_channel.py +3 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_message.py +4 -4
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_embed.py +1 -1
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_global.py +30 -1
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellTokenizer/dshell_keywords.py +2 -0
- {dshellinterpreter-1.2.0.14/dshellInterpreter.egg-info → dshellinterpreter-1.2.0.16}/PKG-INFO +1 -1
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16/dshellInterpreter.egg-info}/PKG-INFO +1 -1
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/setup.py +1 -1
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_embed.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_file.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_interaction.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_ui.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_file.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_list.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_member.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_numbers.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_permissions.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_string.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/utils/utils_type_validation.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/__init__.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/cached_messages.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/dshell_arguments.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/dshell_global_variables.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/dshell_interpreter.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/dshell_scope.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/errors.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/utils_interpreter.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellParser/__init__.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellParser/ast_nodes.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellParser/dshell_parser.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellParser/errors.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellPreProcess/__init__.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellPreProcess/dshell_preprocess.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellTokenizer/__init__.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellTokenizer/dshell_token_type.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellTokenizer/dshell_tokenizer.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/__init__.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/full_import.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/regex_test.py +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/LICENSE +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/README.md +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/dshellInterpreter.egg-info/requires.txt +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/dshellInterpreter.egg-info/top_level.txt +0 -0
- {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/setup.cfg +0 -0
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_channel.py
RENAMED
|
@@ -117,6 +117,9 @@ async def dshell_get_channels_in_category(ctx: Message,
|
|
|
117
117
|
elif regex is not None and search(regex, channel.name):
|
|
118
118
|
channels.add(IntNode(channel.id))
|
|
119
119
|
|
|
120
|
+
else:
|
|
121
|
+
channels.add(IntNode(channel.id))
|
|
122
|
+
|
|
120
123
|
return channels
|
|
121
124
|
|
|
122
125
|
async def dshell_create_text_channel(ctx: Message,
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_message.py
RENAMED
|
@@ -52,16 +52,16 @@ __all__ = [
|
|
|
52
52
|
|
|
53
53
|
async def dshell_send_message(ctx: Message,
|
|
54
54
|
message: Optional[StrNode]=None,
|
|
55
|
-
delete=None,
|
|
56
|
-
channel=None,
|
|
55
|
+
delete: Optional[IntNode]=None,
|
|
56
|
+
channel: Optional[IntNode]=None,
|
|
57
57
|
global_mentions: Optional[BoolNode] = None,
|
|
58
58
|
everyone_mention: BoolNode = BoolNode(1),
|
|
59
59
|
roles_mentions: BoolNode = BoolNode(1),
|
|
60
60
|
users_mentions: BoolNode = BoolNode(1),
|
|
61
61
|
reply_mention: BoolNode = BoolNode(0),
|
|
62
|
-
embeds=None,
|
|
62
|
+
embeds: Optional[ListNode]=None,
|
|
63
63
|
files: Optional[ListNode] = None,
|
|
64
|
-
view=None) -> IntNode:
|
|
64
|
+
view: Optional[EasyModifiedViews]=None) -> IntNode:
|
|
65
65
|
"""
|
|
66
66
|
Sends a message on Discord
|
|
67
67
|
"""
|
|
@@ -19,7 +19,7 @@ def utils_check_embeds_arguments(_CMD: StrNode,
|
|
|
19
19
|
|
|
20
20
|
if embeds is not None:
|
|
21
21
|
if isinstance(embeds, EmbedNode):
|
|
22
|
-
final_embeds.
|
|
22
|
+
final_embeds.add(embeds)
|
|
23
23
|
elif isinstance(embeds, ListNode):
|
|
24
24
|
if (embed_list_size := len(embeds)) > 10:
|
|
25
25
|
raise Exception(f"Embeds argument has more than 10 items, not {embed_list_size} in '{_CMD}' command")
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
__all__ = [
|
|
2
|
+
"utils_help",
|
|
2
3
|
"utils_get_size",
|
|
3
4
|
"utils_make_mention",
|
|
4
5
|
"utils_len",
|
|
@@ -38,7 +39,6 @@ from .utils_type_validation import (_validate_optional_list_node,
|
|
|
38
39
|
_validate_required_int,
|
|
39
40
|
_validate_required_string)
|
|
40
41
|
|
|
41
|
-
|
|
42
42
|
class DiscordType(StrEnum):
|
|
43
43
|
MEMBER = "member"
|
|
44
44
|
ROLE = "role"
|
|
@@ -49,6 +49,35 @@ class DiscordType(StrEnum):
|
|
|
49
49
|
THREAD = "thread"
|
|
50
50
|
UNKNOWN = "unknown"
|
|
51
51
|
|
|
52
|
+
async def utils_help(ctx: Message, command: StrNode) -> StrNode:
|
|
53
|
+
"""
|
|
54
|
+
Renvoie l'aide associé à une commande
|
|
55
|
+
:param ctx:
|
|
56
|
+
:param command:
|
|
57
|
+
:return:
|
|
58
|
+
"""
|
|
59
|
+
_CMD = "help"
|
|
60
|
+
|
|
61
|
+
_validate_required_string(command, "command", _CMD)
|
|
62
|
+
|
|
63
|
+
from inspect import signature, Parameter
|
|
64
|
+
from ...DshellTokenizer.dshell_keywords import dshell_commands
|
|
65
|
+
|
|
66
|
+
if command not in dshell_commands:
|
|
67
|
+
raise ValueError(f"[HELP] command not found : '{command}'")
|
|
68
|
+
|
|
69
|
+
sig = signature(dshell_commands[command])
|
|
70
|
+
result = StrNode("## HELP `{command}`")
|
|
71
|
+
|
|
72
|
+
for nom, param in sig.parameters.items():
|
|
73
|
+
if nom == "ctx":
|
|
74
|
+
continue
|
|
75
|
+
|
|
76
|
+
result += StrNode(f"""
|
|
77
|
+
--{nom} [{param.default if param.default != Parameter.empty else "REQUIRED"}] -> {param.annotation}
|
|
78
|
+
""")
|
|
79
|
+
return result
|
|
80
|
+
|
|
52
81
|
async def utils_get_size(ctx: Message, target: Any):
|
|
53
82
|
"""
|
|
54
83
|
Récupère la taille de l'objet
|
|
@@ -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.16",
|
|
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.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_embed.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_member.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_role.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DISCORD_COMMANDS/dshell_ui.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/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
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/dshell_scope.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellInterpreteur/errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellParser/dshell_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellPreProcess/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/Dshell/DshellTokenizer/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/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.14 → dshellinterpreter-1.2.0.16}/dshellInterpreter.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/dshellInterpreter.egg-info/requires.txt
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.16}/dshellInterpreter.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|