dshellInterpreter 0.2.10.6__py3-none-any.whl → 0.2.12__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 +20 -20
- Dshell/DISCORD_COMMANDS/dshell_message.py +1 -1
- Dshell/_DshellInterpreteur/dshell_interpreter.py +1 -0
- {dshellinterpreter-0.2.10.6.dist-info → dshellinterpreter-0.2.12.dist-info}/METADATA +1 -1
- {dshellinterpreter-0.2.10.6.dist-info → dshellinterpreter-0.2.12.dist-info}/RECORD +8 -8
- {dshellinterpreter-0.2.10.6.dist-info → dshellinterpreter-0.2.12.dist-info}/WHEEL +0 -0
- {dshellinterpreter-0.2.10.6.dist-info → dshellinterpreter-0.2.12.dist-info}/licenses/LICENSE +0 -0
- {dshellinterpreter-0.2.10.6.dist-info → dshellinterpreter-0.2.12.dist-info}/top_level.txt +0 -0
|
@@ -109,16 +109,16 @@ async def dshell_create_text_channel(ctx: Message,
|
|
|
109
109
|
Creates a text channel on the server
|
|
110
110
|
"""
|
|
111
111
|
|
|
112
|
-
if not isinstance(position, _MissingSentinel
|
|
112
|
+
if not isinstance(position, (_MissingSentinel, int)):
|
|
113
113
|
raise Exception(f"Position must be an integer, not {type(position)} !")
|
|
114
114
|
|
|
115
|
-
if not isinstance(slowmode, _MissingSentinel
|
|
115
|
+
if not isinstance(slowmode, (_MissingSentinel, int)):
|
|
116
116
|
raise Exception(f"Slowmode must be an integer, not {type(slowmode)} !")
|
|
117
117
|
|
|
118
|
-
if not isinstance(topic, _MissingSentinel
|
|
118
|
+
if not isinstance(topic, (_MissingSentinel, str)):
|
|
119
119
|
raise Exception(f"Topic must be a string, not {type(topic)} !")
|
|
120
120
|
|
|
121
|
-
if not isinstance(nsfw, _MissingSentinel
|
|
121
|
+
if not isinstance(nsfw, (_MissingSentinel, bool)):
|
|
122
122
|
raise Exception(f"NSFW must be a boolean, not {type(nsfw)} !")
|
|
123
123
|
|
|
124
124
|
channel_category = ctx.channel.category if category is None else ctx.channel.guild.get_channel(category)
|
|
@@ -145,10 +145,10 @@ async def dshell_create_voice_channel(ctx: Message,
|
|
|
145
145
|
"""
|
|
146
146
|
Creates a voice channel on the server
|
|
147
147
|
"""
|
|
148
|
-
if not isinstance(position, _MissingSentinel
|
|
148
|
+
if not isinstance(position, (_MissingSentinel, int)):
|
|
149
149
|
raise Exception(f"Position must be an integer, not {type(position)} !")
|
|
150
150
|
|
|
151
|
-
if not isinstance(bitrate, _MissingSentinel
|
|
151
|
+
if not isinstance(bitrate, (_MissingSentinel, int)):
|
|
152
152
|
raise Exception(f"Bitrate must be an integer, not {type(bitrate)} !")
|
|
153
153
|
|
|
154
154
|
channel_category = ctx.channel.category if category is None else ctx.channel.guild.get_channel(category)
|
|
@@ -216,16 +216,16 @@ async def dshell_edit_text_channel(ctx: Message,
|
|
|
216
216
|
Edits a text channel on the server
|
|
217
217
|
"""
|
|
218
218
|
|
|
219
|
-
if not isinstance(position, _MissingSentinel
|
|
219
|
+
if not isinstance(position, (_MissingSentinel, int)):
|
|
220
220
|
raise Exception(f"Position must be an integer, not {type(position)} !")
|
|
221
221
|
|
|
222
|
-
if not isinstance(slowmode, _MissingSentinel
|
|
222
|
+
if not isinstance(slowmode, (_MissingSentinel, int)):
|
|
223
223
|
raise Exception(f"Slowmode must be an integer, not {type(slowmode)} !")
|
|
224
224
|
|
|
225
|
-
if not isinstance(topic, _MissingSentinel
|
|
225
|
+
if not isinstance(topic, (_MissingSentinel, str)):
|
|
226
226
|
raise Exception(f"Topic must be a string, not {type(topic)} !")
|
|
227
227
|
|
|
228
|
-
if not isinstance(nsfw, _MissingSentinel
|
|
228
|
+
if not isinstance(nsfw, (_MissingSentinel, bool)):
|
|
229
229
|
raise Exception(f"NSFW must be a boolean, not {type(nsfw)} !")
|
|
230
230
|
|
|
231
231
|
channel_to_edit = ctx.channel if channel is None else ctx.channel.guild.get_channel(channel)
|
|
@@ -254,10 +254,10 @@ async def dshell_edit_voice_channel(ctx: Message,
|
|
|
254
254
|
"""
|
|
255
255
|
Edits a voice channel on the server
|
|
256
256
|
"""
|
|
257
|
-
if not isinstance(position, _MissingSentinel
|
|
257
|
+
if not isinstance(position, (_MissingSentinel, int)):
|
|
258
258
|
raise Exception(f"Position must be an integer, not {type(position)} !")
|
|
259
259
|
|
|
260
|
-
if not isinstance(bitrate, _MissingSentinel
|
|
260
|
+
if not isinstance(bitrate, (_MissingSentinel, int)):
|
|
261
261
|
raise Exception(f"Bitrate must be an integer, not {type(bitrate)} !")
|
|
262
262
|
|
|
263
263
|
channel_to_edit = ctx.channel if channel is None else ctx.channel.guild.get_channel(channel)
|
|
@@ -292,19 +292,19 @@ async def dshell_create_thread_message(ctx: Message,
|
|
|
292
292
|
if not isinstance(name, str):
|
|
293
293
|
raise Exception(f"Name must be a string, not {type(name)} !")
|
|
294
294
|
|
|
295
|
-
if not isinstance(archive, _MissingSentinel
|
|
295
|
+
if not isinstance(archive, (_MissingSentinel, int)):
|
|
296
296
|
raise Exception(f"Auto archive duration must be an integer, not {type(archive)} !")
|
|
297
297
|
|
|
298
298
|
if not isinstance(archive, _MissingSentinel) and archive not in (60, 1440, 4320, 10080):
|
|
299
299
|
raise Exception("Auto archive duration must be one of the following values: 60, 1440, 4320, 10080 !")
|
|
300
300
|
|
|
301
|
-
if not isinstance(slowmode, _MissingSentinel
|
|
301
|
+
if not isinstance(slowmode, (_MissingSentinel, int)):
|
|
302
302
|
raise Exception(f"Slowmode delay must be an integer, not {type(slowmode)} !")
|
|
303
303
|
|
|
304
304
|
if not isinstance(slowmode, _MissingSentinel) and slowmode < 0:
|
|
305
305
|
raise Exception("Slowmode delay must be a positive integer !")
|
|
306
306
|
|
|
307
|
-
thread = await message.create_thread(name=name,
|
|
307
|
+
thread = await message.fetch().create_thread(name=name,
|
|
308
308
|
auto_archive_duration=archive,
|
|
309
309
|
slowmode_delay=slowmode)
|
|
310
310
|
|
|
@@ -326,16 +326,16 @@ async def dshell_edit_thread(ctx: Message,
|
|
|
326
326
|
|
|
327
327
|
thread = await utils_get_thread(ctx, thread)
|
|
328
328
|
|
|
329
|
-
if not isinstance(name, _MissingSentinel
|
|
329
|
+
if not isinstance(name, (_MissingSentinel, str)):
|
|
330
330
|
raise Exception(f"Name must be a string, not {type(name)} !")
|
|
331
331
|
|
|
332
|
-
if not isinstance(archive, _MissingSentinel
|
|
332
|
+
if not isinstance(archive, (_MissingSentinel, int)):
|
|
333
333
|
raise Exception(f"Auto archive duration must be an integer, not {type(archive)} !")
|
|
334
334
|
|
|
335
335
|
if not isinstance(archive, _MissingSentinel) and archive not in (60, 1440, 4320, 10080):
|
|
336
336
|
raise Exception("Auto archive duration must be one of the following values: 60, 1440, 4320, 10080 !")
|
|
337
337
|
|
|
338
|
-
if not isinstance(slowmode, _MissingSentinel
|
|
338
|
+
if not isinstance(slowmode, (_MissingSentinel, int)):
|
|
339
339
|
raise Exception(f"Slowmode delay must be an integer, not {type(slowmode)} !")
|
|
340
340
|
|
|
341
341
|
if not isinstance(slowmode, _MissingSentinel) and slowmode < 0:
|
|
@@ -355,7 +355,7 @@ async def dshell_get_thread(ctx: Message, message: Union[int, str] = None):
|
|
|
355
355
|
if message is None:
|
|
356
356
|
message = ctx.id
|
|
357
357
|
|
|
358
|
-
message = await utils_get_message(ctx, message)
|
|
358
|
+
message = await utils_get_message(ctx, message).fetch()
|
|
359
359
|
|
|
360
360
|
if not hasattr(message, 'thread'):
|
|
361
361
|
return None
|
|
@@ -376,7 +376,7 @@ async def dshell_delete_thread(ctx: Message, thread: Union[int, str] = None, rea
|
|
|
376
376
|
if thread is None:
|
|
377
377
|
thread = ctx.id
|
|
378
378
|
|
|
379
|
-
thread = await utils_get_message(ctx, thread)
|
|
379
|
+
thread = await utils_get_message(ctx, thread).fetch()
|
|
380
380
|
|
|
381
381
|
if not hasattr(thread, 'thread'):
|
|
382
382
|
raise Exception("The specified message does not have a thread !")
|
|
@@ -25,7 +25,7 @@ async def dshell_send_message(ctx: Message, message=None, delete=None, channel=N
|
|
|
25
25
|
"""
|
|
26
26
|
Sends a message on Discord
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
if delete is not None and not isinstance(delete, (int, float)):
|
|
30
30
|
raise Exception(f'Delete parameter must be a number (seconds) or None, not {type(delete)} !')
|
|
31
31
|
|
|
@@ -338,6 +338,7 @@ def regroupe_commandes(body: list[Token], interpreter: DshellInterpreteur) -> li
|
|
|
338
338
|
type_=DTT.SEPARATOR, value=body[i].value, position=body[i].position)
|
|
339
339
|
] + body[i + 1:], interpreter
|
|
340
340
|
) # add a sub-dictionary for sub-commands
|
|
341
|
+
i += len(body[i:])
|
|
341
342
|
# return list_tokens
|
|
342
343
|
|
|
343
344
|
elif (body[i].type == DTT.SEPARATOR and
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Dshell/__init__.py,sha256=pGd94FPy8kVXH_jH566HhApQPhbPfMPnZXzH_0dPWh0,93
|
|
2
2
|
Dshell/_utils.py,sha256=PJ3fwn8IMqUMnW9oTwfr9v4--rzHIhhLQoVVqjwjoJU,23
|
|
3
3
|
Dshell/DISCORD_COMMANDS/__init__.py,sha256=8JPQ-6-s8PkaacmOfQgyczUiLM6rUSceHEJ60oNSis0,173
|
|
4
|
-
Dshell/DISCORD_COMMANDS/dshell_channel.py,sha256=
|
|
4
|
+
Dshell/DISCORD_COMMANDS/dshell_channel.py,sha256=BTZIouT_481UdQVB5XGzVSU1P6K49ZCHQEMG8hwS8eA,15711
|
|
5
5
|
Dshell/DISCORD_COMMANDS/dshell_member.py,sha256=5Iw-2dydhYMZOw2nx0svZP9JpZWHOXC0qkL9tClJHtw,8840
|
|
6
|
-
Dshell/DISCORD_COMMANDS/dshell_message.py,sha256=
|
|
6
|
+
Dshell/DISCORD_COMMANDS/dshell_message.py,sha256=GipL24mP6iWnzfp6bNoXnn_ULJFbjrnpl-ROyAN2TAQ,6962
|
|
7
7
|
Dshell/DISCORD_COMMANDS/dshell_pastbin.py,sha256=TkWFGRRTvhhJgvwkDFx9Fz4UM2UUFwxyq0laMVx0mUk,881
|
|
8
8
|
Dshell/DISCORD_COMMANDS/dshell_role.py,sha256=t_yRZRD0FKE2gT4dIDIsHz2PSZZztDVEkkqkG_OkNh4,5002
|
|
9
9
|
Dshell/DISCORD_COMMANDS/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
Dshell/DISCORD_COMMANDS/utils/utils_message.py,sha256=Pn0ljyeCvRfY4tlWHrSbIsxSFZZ5J4lDaeVme3WHp9o,1239
|
|
11
11
|
Dshell/DISCORD_COMMANDS/utils/utils_thread.py,sha256=tVl4msEwrWHY-0AytI6eY3JSs-eIFUigDSJfK9mT1ww,1457
|
|
12
12
|
Dshell/_DshellInterpreteur/__init__.py,sha256=xy5-J-R3YmY99JF3NBHTRRLsComFxpjnCA5xacISctU,35
|
|
13
|
-
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=
|
|
13
|
+
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=PF3pyDdRCSJDMtnBfCKVYeWRbHRdkJYlJOtb_JoUghQ,23195
|
|
14
14
|
Dshell/_DshellParser/__init__.py,sha256=ONDfhZMvClqP_6tE8SLjp-cf3pXL-auQYnfYRrHZxC4,56
|
|
15
15
|
Dshell/_DshellParser/ast_nodes.py,sha256=heOMQzAchQ8UroQaMSfU_6SYEXw-nme0jGcoVkCXPUs,15284
|
|
16
16
|
Dshell/_DshellParser/dshell_parser.py,sha256=RxS5GgmTel10pH9HII0X_8XZnVyIQGd9ThZZcZDpEqc,15545
|
|
@@ -18,8 +18,8 @@ Dshell/_DshellTokenizer/__init__.py,sha256=LIQSRhDx2B9pmPx5ADMwwD0Xr9ybneVLhHH8q
|
|
|
18
18
|
Dshell/_DshellTokenizer/dshell_keywords.py,sha256=yBTXKBCb7NZa-DGDeeyIZrl_CS1Y4WCmwshUdBHQhlo,5642
|
|
19
19
|
Dshell/_DshellTokenizer/dshell_token_type.py,sha256=gYIb2XN2YcgeRgmar_rBDS5CGmwfmxihu8mOW_d6lbE,1533
|
|
20
20
|
Dshell/_DshellTokenizer/dshell_tokenizer.py,sha256=LZGs4Ytuyx9Galazqtz32lS4Mmu9yZya1B7AzFQAQOk,7150
|
|
21
|
-
dshellinterpreter-0.2.
|
|
22
|
-
dshellinterpreter-0.2.
|
|
23
|
-
dshellinterpreter-0.2.
|
|
24
|
-
dshellinterpreter-0.2.
|
|
25
|
-
dshellinterpreter-0.2.
|
|
21
|
+
dshellinterpreter-0.2.12.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
|
|
22
|
+
dshellinterpreter-0.2.12.dist-info/METADATA,sha256=q5NC1nXj1L8XtgcujDD6NbG-FvU5c1JtIX8J3dec9pc,1121
|
|
23
|
+
dshellinterpreter-0.2.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
dshellinterpreter-0.2.12.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
|
|
25
|
+
dshellinterpreter-0.2.12.dist-info/RECORD,,
|
|
File without changes
|
{dshellinterpreter-0.2.10.6.dist-info → dshellinterpreter-0.2.12.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|