dshellInterpreter 1.2.0.21__tar.gz → 1.2.0.22__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.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_channel.py +24 -17
- {dshellinterpreter-1.2.0.21/dshellInterpreter.egg-info → dshellinterpreter-1.2.0.22}/PKG-INFO +1 -1
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22/dshellInterpreter.egg-info}/PKG-INFO +1 -1
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/setup.py +1 -1
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_embed.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_file.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_interaction.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_message.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_ui.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_embed.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_file.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_global.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_list.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_member.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_numbers.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_permissions.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_string.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/utils/utils_type_validation.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/__init__.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/cached_messages.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/dshell_arguments.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/dshell_global_variables.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/dshell_interpreter.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/dshell_scope.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/errors.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/utils_interpreter.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellParser/__init__.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellParser/ast_nodes.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellParser/dshell_parser.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellParser/errors.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellPreProcess/__init__.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellPreProcess/dshell_preprocess.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellTokenizer/__init__.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellTokenizer/dshell_keywords.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellTokenizer/dshell_token_type.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellTokenizer/dshell_tokenizer.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/__init__.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/full_import.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/regex_test.py +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/LICENSE +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/README.md +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/dshellInterpreter.egg-info/requires.txt +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/dshellInterpreter.egg-info/top_level.txt +0 -0
- {dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/setup.cfg +0 -0
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_channel.py
RENAMED
|
@@ -75,12 +75,15 @@ async def dshell_get_channels(ctx: Message, name: Optional[StrNode]=None, regex:
|
|
|
75
75
|
channels = ListNode([])
|
|
76
76
|
|
|
77
77
|
for channel in ctx.channel.guild.channels:
|
|
78
|
-
if name is not None and channel.name ==
|
|
78
|
+
if name is not None and channel.name == name:
|
|
79
79
|
channels.add(IntNode(channel.id))
|
|
80
80
|
|
|
81
81
|
elif regex is not None and search(regex, channel.name):
|
|
82
82
|
channels.add(IntNode(channel.id))
|
|
83
83
|
|
|
84
|
+
else:
|
|
85
|
+
channels.add(IntNode(channel.id))
|
|
86
|
+
|
|
84
87
|
return channels
|
|
85
88
|
|
|
86
89
|
async def dshell_get_channels_in_category(ctx: Message,
|
|
@@ -155,13 +158,15 @@ async def dshell_create_text_channel(ctx: Message,
|
|
|
155
158
|
|
|
156
159
|
channel_category = ctx.channel.category if category is None else ctx.channel.guild.get_channel(category)
|
|
157
160
|
|
|
161
|
+
final_permissions = permissions.value if not MISSING else permissions
|
|
162
|
+
|
|
158
163
|
created_channel = await ctx.guild.create_text_channel(str(name),
|
|
159
164
|
category=channel_category,
|
|
160
165
|
position=position,
|
|
161
166
|
slowmode_delay=slowmode,
|
|
162
167
|
topic=topic,
|
|
163
168
|
nsfw=nsfw,
|
|
164
|
-
overwrites=
|
|
169
|
+
overwrites=final_permissions,
|
|
165
170
|
reason=reason)
|
|
166
171
|
|
|
167
172
|
return IntNode(created_channel.id)
|
|
@@ -193,19 +198,21 @@ async def dshell_create_voice_channel(ctx: Message,
|
|
|
193
198
|
|
|
194
199
|
channel_category = ctx.channel.category if category is None else ctx.channel.guild.get_channel(category)
|
|
195
200
|
|
|
201
|
+
final_permissions = permissions.value if not MISSING else permissions
|
|
202
|
+
|
|
196
203
|
created_channel = await ctx.guild.create_voice_channel(StrNode(name),
|
|
197
204
|
category=channel_category,
|
|
198
205
|
position=position,
|
|
199
206
|
bitrate=bitrate,
|
|
200
|
-
overwrites=
|
|
207
|
+
overwrites=final_permissions,
|
|
201
208
|
reason=reason)
|
|
202
209
|
|
|
203
210
|
return IntNode(created_channel.id)
|
|
204
211
|
|
|
205
212
|
|
|
206
213
|
async def dshell_delete_channel(ctx: Message,
|
|
207
|
-
channel=None,
|
|
208
|
-
reason=None,
|
|
214
|
+
channel: Optional[IntNode]=None,
|
|
215
|
+
reason: Optional[StrNode]=None,
|
|
209
216
|
timeout: FloatNode = FloatNode(0)):
|
|
210
217
|
"""
|
|
211
218
|
Deletes a channel.
|
|
@@ -285,7 +292,7 @@ async def dshell_edit_text_channel(ctx: Message,
|
|
|
285
292
|
_validate_optional_string(reason, "Reason", _CMD)
|
|
286
293
|
|
|
287
294
|
channel_to_edit = ctx.channel if channel is None else ctx.channel.guild.get_channel(channel)
|
|
288
|
-
new_categoy = ctx.channel.category if
|
|
295
|
+
new_categoy = ctx.channel.category if category is MISSING else ctx.channel.guild.get_channel(category)
|
|
289
296
|
|
|
290
297
|
if channel_to_edit is None:
|
|
291
298
|
raise Exception(f"Channel {channel} not found !")
|
|
@@ -303,13 +310,13 @@ async def dshell_edit_text_channel(ctx: Message,
|
|
|
303
310
|
|
|
304
311
|
|
|
305
312
|
async def dshell_edit_voice_channel(ctx: Message,
|
|
306
|
-
channel=None,
|
|
313
|
+
channel: Optional[IntNode]=None,
|
|
307
314
|
name: Optional[StrNode]=None,
|
|
308
315
|
category: IntNode = MISSING,
|
|
309
316
|
position: IntNode = MISSING,
|
|
310
317
|
bitrate: IntNode = MISSING,
|
|
311
318
|
permissions: PermissionNode = MISSING,
|
|
312
|
-
reason=None):
|
|
319
|
+
reason: Optional[StrNode]=None):
|
|
313
320
|
"""
|
|
314
321
|
Edits a voice channel on the server
|
|
315
322
|
"""
|
|
@@ -330,7 +337,7 @@ async def dshell_edit_voice_channel(ctx: Message,
|
|
|
330
337
|
_validate_optional_string(reason, "Reason", _CMD)
|
|
331
338
|
|
|
332
339
|
channel_to_edit = ctx.channel if channel is None else ctx.channel.guild.get_channel(channel)
|
|
333
|
-
new_categoy = ctx.channel.category if
|
|
340
|
+
new_categoy = ctx.channel.category if category is MISSING else ctx.channel.guild.get_channel(category)
|
|
334
341
|
|
|
335
342
|
if channel_to_edit is None:
|
|
336
343
|
raise Exception(f"Channel {channel} not found !")
|
|
@@ -356,7 +363,7 @@ async def dshell_create_thread_message(ctx: Message,
|
|
|
356
363
|
|
|
357
364
|
_CMD = "ct"
|
|
358
365
|
|
|
359
|
-
|
|
366
|
+
final_message = ctx if message is None else await utils_get_message(ctx, message)
|
|
360
367
|
|
|
361
368
|
_validate_required_string(name, "Name", _CMD)
|
|
362
369
|
|
|
@@ -372,7 +379,7 @@ async def dshell_create_thread_message(ctx: Message,
|
|
|
372
379
|
if isinstance(slowmode, IntNode) and slowmode < 0:
|
|
373
380
|
raise Exception("Slowmode delay must be a positive integer !")
|
|
374
381
|
|
|
375
|
-
thread = await
|
|
382
|
+
thread = await final_message.create_thread(name=name,
|
|
376
383
|
auto_archive_duration=archive,
|
|
377
384
|
slowmode_delay=slowmode)
|
|
378
385
|
|
|
@@ -394,7 +401,7 @@ async def dshell_edit_thread(ctx: Message,
|
|
|
394
401
|
if thread is None:
|
|
395
402
|
raise Exception("Thread must be specified !")
|
|
396
403
|
|
|
397
|
-
|
|
404
|
+
final_thread = await utils_get_thread(ctx, thread)
|
|
398
405
|
|
|
399
406
|
_validate_missing_or_type(name, "Name", StrNode, _CMD)
|
|
400
407
|
|
|
@@ -410,12 +417,12 @@ async def dshell_edit_thread(ctx: Message,
|
|
|
410
417
|
if isinstance(slowmode, IntNode) and slowmode < 0:
|
|
411
418
|
raise Exception("Slowmode delay must be a positive integer !")
|
|
412
419
|
|
|
413
|
-
await
|
|
420
|
+
await final_thread.edit(name=name if name is not None else thread.name,
|
|
414
421
|
auto_archive_duration=archive if archive is not MISSING else thread.auto_archive_duration,
|
|
415
422
|
slowmode_delay=slowmode if slowmode is not MISSING else thread.slowmode_delay,
|
|
416
423
|
reason=reason)
|
|
417
424
|
|
|
418
|
-
return IntNode(
|
|
425
|
+
return IntNode(final_thread.id)
|
|
419
426
|
|
|
420
427
|
|
|
421
428
|
async def dshell_get_thread(ctx: Message, message: Optional[Union[IntNode, StrNode]] = None):
|
|
@@ -425,13 +432,13 @@ async def dshell_get_thread(ctx: Message, message: Optional[Union[IntNode, StrNo
|
|
|
425
432
|
|
|
426
433
|
_CMD = "gt"
|
|
427
434
|
|
|
428
|
-
|
|
435
|
+
final_message = ctx if message is None else await utils_get_message(ctx, message)
|
|
429
436
|
|
|
430
437
|
# Return None if message doesn't have thread attribute (not raising error for this case)
|
|
431
438
|
if not hasattr(message, 'thread'):
|
|
432
439
|
return None
|
|
433
440
|
|
|
434
|
-
thread =
|
|
441
|
+
thread = final_message.thread
|
|
435
442
|
|
|
436
443
|
if thread is None:
|
|
437
444
|
return None
|
|
@@ -486,7 +493,7 @@ async def dshell_create_category(ctx: Message,
|
|
|
486
493
|
return IntNode(created_category.id)
|
|
487
494
|
|
|
488
495
|
async def dshell_edit_category(ctx: Message,
|
|
489
|
-
category,
|
|
496
|
+
category: IntNode,
|
|
490
497
|
name: Optional[StrNode]=None,
|
|
491
498
|
position=MISSING,
|
|
492
499
|
permissions: PermissionNode = MISSING,
|
|
@@ -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.22",
|
|
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.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_embed.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_member.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_message.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_role.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DISCORD_COMMANDS/dshell_ui.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/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.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/dshell_scope.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellInterpreteur/errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellParser/dshell_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellPreProcess/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellTokenizer/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/Dshell/DshellTokenizer/dshell_keywords.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/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.21 → dshellinterpreter-1.2.0.22}/dshellInterpreter.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/dshellInterpreter.egg-info/requires.txt
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.0.21 → dshellinterpreter-1.2.0.22}/dshellInterpreter.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|