dshellInterpreter 0.2.18.2__py3-none-any.whl → 0.2.18.4__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_channel.py +2 -0
- Dshell/DISCORD_COMMANDS/utils/utils_string.py +4 -2
- Dshell/_DshellInterpreteur/dshell_interpreter.py +3 -2
- {dshellinterpreter-0.2.18.2.dist-info → dshellinterpreter-0.2.18.4.dist-info}/METADATA +1 -1
- {dshellinterpreter-0.2.18.2.dist-info → dshellinterpreter-0.2.18.4.dist-info}/RECORD +8 -8
- {dshellinterpreter-0.2.18.2.dist-info → dshellinterpreter-0.2.18.4.dist-info}/WHEEL +0 -0
- {dshellinterpreter-0.2.18.2.dist-info → dshellinterpreter-0.2.18.4.dist-info}/licenses/LICENSE +0 -0
- {dshellinterpreter-0.2.18.2.dist-info → dshellinterpreter-0.2.18.4.dist-info}/top_level.txt +0 -0
|
@@ -215,6 +215,8 @@ async def dshell_edit_text_channel(ctx: Message,
|
|
|
215
215
|
"""
|
|
216
216
|
Edits a text channel on the server
|
|
217
217
|
"""
|
|
218
|
+
if name is not None and not isinstance(name, str):
|
|
219
|
+
raise Exception(f"Name must be a string, not {type(name)} !")
|
|
218
220
|
|
|
219
221
|
if not isinstance(position, (_MissingSentinel, int)):
|
|
220
222
|
raise Exception(f"Position must be an integer, not {type(position)} !")
|
|
@@ -138,7 +138,7 @@ async def utils_regex_sub(ctx: Message, regex: str, replace: str, content: str =
|
|
|
138
138
|
|
|
139
139
|
return sub(regex, replace, content if content is not None else ctx.content)
|
|
140
140
|
|
|
141
|
-
async def utils_regex_search(ctx: Message, regex: str, content: str = None) ->
|
|
141
|
+
async def utils_regex_search(ctx: Message, regex: str, content: str = None) -> str:
|
|
142
142
|
"""
|
|
143
143
|
Search for a regex in a string.
|
|
144
144
|
:param regex:
|
|
@@ -152,4 +152,6 @@ async def utils_regex_search(ctx: Message, regex: str, content: str = None) -> b
|
|
|
152
152
|
if content is not None and not isinstance(content, str):
|
|
153
153
|
raise Exception(f"Content must be a string, not {type(content)}!")
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
result = search(regex, content if content is not None else ctx.content)
|
|
156
|
+
|
|
157
|
+
return result.group() if result else ''
|
|
@@ -382,6 +382,7 @@ def regroupe_commandes(body: list[Token], interpreter: DshellInterpreteur, norma
|
|
|
382
382
|
n = len(body)
|
|
383
383
|
list_tokens: list[dict] = [tokens]
|
|
384
384
|
|
|
385
|
+
tokens_valide = (DTT.IDENT, DTT.COMMAND)
|
|
385
386
|
i = 0
|
|
386
387
|
while i < n:
|
|
387
388
|
|
|
@@ -389,7 +390,7 @@ def regroupe_commandes(body: list[Token], interpreter: DshellInterpreteur, norma
|
|
|
389
390
|
body[i].value = body[i].value.lower()
|
|
390
391
|
|
|
391
392
|
if body[i].type == DTT.SEPARATOR and body[
|
|
392
|
-
i + 1].type
|
|
393
|
+
i + 1].type in tokens_valide: # Check if it's a separator and if the next token is an IDENT
|
|
393
394
|
current_arg = body[i + 1].value # change the current argument. It will be impossible to return to '*'
|
|
394
395
|
tokens[current_arg] = '' # create a key/value pair for it
|
|
395
396
|
i += 2 # skip the IDENT after the separator since it has just been processed
|
|
@@ -406,7 +407,7 @@ def regroupe_commandes(body: list[Token], interpreter: DshellInterpreteur, norma
|
|
|
406
407
|
|
|
407
408
|
elif (body[i].type == DTT.SEPARATOR and
|
|
408
409
|
(body[i + 1].type == DTT.MATHS_OPERATOR and body[i + 1].value == '*') and
|
|
409
|
-
body[i + 2].type
|
|
410
|
+
body[i + 2].type in tokens_valide and
|
|
410
411
|
body[i + 3].type == DTT.ENGLOBE_SEPARATOR):
|
|
411
412
|
current_arg = body[i + 2].value # change the current argument
|
|
412
413
|
tokens['--*'][current_arg] = body[i + 3].value
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Dshell/__init__.py,sha256=gEgfeYoyHn4bUepMd0F-MSx36rR8WgQGxNpgDKo2qbA,136
|
|
2
2
|
Dshell/_utils.py,sha256=PJ3fwn8IMqUMnW9oTwfr9v4--rzHIhhLQoVVqjwjoJU,23
|
|
3
3
|
Dshell/DISCORD_COMMANDS/__init__.py,sha256=87-YpGU74m-m7AqUQni7PGbw73JRlioQkywW_61Whms,208
|
|
4
|
-
Dshell/DISCORD_COMMANDS/dshell_channel.py,sha256=
|
|
4
|
+
Dshell/DISCORD_COMMANDS/dshell_channel.py,sha256=XK7ZcM4HVIUU6UZSDVhmBE6oLhcG9cEcCTrKpPzy_0s,15823
|
|
5
5
|
Dshell/DISCORD_COMMANDS/dshell_interaction.py,sha256=5FA8JZ2_v98ZzOZl6EKyjo_fUQC7FuK6C6hij6ZSP30,3495
|
|
6
6
|
Dshell/DISCORD_COMMANDS/dshell_member.py,sha256=5Iw-2dydhYMZOw2nx0svZP9JpZWHOXC0qkL9tClJHtw,8840
|
|
7
7
|
Dshell/DISCORD_COMMANDS/dshell_message.py,sha256=SI8w3tuVGNsNa4OW9h08POjhmHjUVpSUAi_0a4XBAF4,9095
|
|
@@ -13,10 +13,10 @@ Dshell/DISCORD_COMMANDS/utils/utils_list.py,sha256=zqImMWvD-1UnbPP1TZewnvZpq7qs1
|
|
|
13
13
|
Dshell/DISCORD_COMMANDS/utils/utils_member.py,sha256=1EoHooxwijc7AFJGnuae3ccjQk0x69MELtZ5ES5abLY,1165
|
|
14
14
|
Dshell/DISCORD_COMMANDS/utils/utils_message.py,sha256=cQvJ15f49ddOjybARwkJKNFe3ITYQciF-pZHERFPkr0,2964
|
|
15
15
|
Dshell/DISCORD_COMMANDS/utils/utils_permissions.py,sha256=Gi6vpCA2yXUZ20OCay5dkX6HeN4LglVROwcvTWVCsKg,3600
|
|
16
|
-
Dshell/DISCORD_COMMANDS/utils/utils_string.py,sha256=
|
|
16
|
+
Dshell/DISCORD_COMMANDS/utils/utils_string.py,sha256=2LvJG_PR_VkPdnsw0vKNTwhEQGNog-3gFd_rZIUpGKc,4709
|
|
17
17
|
Dshell/DISCORD_COMMANDS/utils/utils_thread.py,sha256=tVl4msEwrWHY-0AytI6eY3JSs-eIFUigDSJfK9mT1ww,1457
|
|
18
18
|
Dshell/_DshellInterpreteur/__init__.py,sha256=jl_gH8MoqerW--I-IHXwUZTo80JOtfr7AOA57xVgeGQ,58
|
|
19
|
-
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=
|
|
19
|
+
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=WrYwJHXv3e7dbWOqsTW3ATjl62Ct2Ly_TKCg1LhJ03s,29613
|
|
20
20
|
Dshell/_DshellInterpreteur/errors.py,sha256=0PJz_VYZfNZeKR_PEHxw3tRkgKNNUerV0wwrq2r1luA,250
|
|
21
21
|
Dshell/_DshellParser/__init__.py,sha256=ONDfhZMvClqP_6tE8SLjp-cf3pXL-auQYnfYRrHZxC4,56
|
|
22
22
|
Dshell/_DshellParser/ast_nodes.py,sha256=RLlylX9bvbJEG3BDMGS4mnMxU8ufnZYIF59NVf_pW7A,18883
|
|
@@ -25,8 +25,8 @@ Dshell/_DshellTokenizer/__init__.py,sha256=LIQSRhDx2B9pmPx5ADMwwD0Xr9ybneVLhHH8q
|
|
|
25
25
|
Dshell/_DshellTokenizer/dshell_keywords.py,sha256=TI5O6y6gAXpM_dKxCW9Fk0H8VR-gmyxxKKOURgcHsCg,7219
|
|
26
26
|
Dshell/_DshellTokenizer/dshell_token_type.py,sha256=gYIb2XN2YcgeRgmar_rBDS5CGmwfmxihu8mOW_d6lbE,1533
|
|
27
27
|
Dshell/_DshellTokenizer/dshell_tokenizer.py,sha256=AJnUocD6hbU6wvjRAN5uDha5QQieTwXlHzZVtgRGaZQ,7307
|
|
28
|
-
dshellinterpreter-0.2.18.
|
|
29
|
-
dshellinterpreter-0.2.18.
|
|
30
|
-
dshellinterpreter-0.2.18.
|
|
31
|
-
dshellinterpreter-0.2.18.
|
|
32
|
-
dshellinterpreter-0.2.18.
|
|
28
|
+
dshellinterpreter-0.2.18.4.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
|
|
29
|
+
dshellinterpreter-0.2.18.4.dist-info/METADATA,sha256=ok2SM1_HGv_uDUkA5MCxs_nb8v_pV6G6G4yUiv6joOA,1151
|
|
30
|
+
dshellinterpreter-0.2.18.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
dshellinterpreter-0.2.18.4.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
|
|
32
|
+
dshellinterpreter-0.2.18.4.dist-info/RECORD,,
|
|
File without changes
|
{dshellinterpreter-0.2.18.2.dist-info → dshellinterpreter-0.2.18.4.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|