dshellInterpreter 0.2.19.4__tar.gz → 0.2.19.5__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.
Potentially problematic release.
This version of dshellInterpreter might be problematic. Click here for more details.
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_channel.py +16 -4
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_message.py +8 -5
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +11 -5
- {dshellinterpreter-0.2.19.4/dshellInterpreter.egg-info → dshellinterpreter-0.2.19.5}/PKG-INFO +1 -1
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5/dshellInterpreter.egg-info}/PKG-INFO +1 -1
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/setup.py +1 -1
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_interaction.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/utils/utils_global.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/utils/utils_list.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/utils/utils_member.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/utils/utils_permissions.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/utils/utils_string.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellInterpreteur/__init__.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellInterpreteur/cached_messages.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellInterpreteur/dshell_interpreter.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellInterpreteur/errors.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellParser/__init__.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellParser/ast_nodes.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellParser/dshell_parser.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellTokenizer/__init__.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellTokenizer/dshell_keywords.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellTokenizer/dshell_token_type.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellTokenizer/dshell_tokenizer.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/__init__.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_utils.py +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/LICENSE +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/README.md +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/dshellInterpreter.egg-info/requires.txt +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/dshellInterpreter.egg-info/top_level.txt +0 -0
- {dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/setup.cfg +0 -0
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_channel.py
RENAMED
|
@@ -2,7 +2,7 @@ from asyncio import sleep
|
|
|
2
2
|
from re import search
|
|
3
3
|
from typing import Union
|
|
4
4
|
|
|
5
|
-
from discord import MISSING, PermissionOverwrite, Member, Role, Message, CategoryChannel
|
|
5
|
+
from discord import MISSING, PermissionOverwrite, Member, Role, Message, CategoryChannel, PartialMessage
|
|
6
6
|
from discord.utils import _MissingSentinel
|
|
7
7
|
|
|
8
8
|
from .utils.utils_message import utils_get_message
|
|
@@ -320,7 +320,11 @@ async def dshell_create_thread_message(ctx: Message,
|
|
|
320
320
|
if not isinstance(slowmode, _MissingSentinel) and slowmode < 0:
|
|
321
321
|
raise Exception("Slowmode delay must be a positive integer !")
|
|
322
322
|
|
|
323
|
-
|
|
323
|
+
if isinstance(message, PartialMessage):
|
|
324
|
+
m = await message.fetch()
|
|
325
|
+
else:
|
|
326
|
+
m = message
|
|
327
|
+
|
|
324
328
|
thread = await m.create_thread(name=name,
|
|
325
329
|
auto_archive_duration=archive,
|
|
326
330
|
slowmode_delay=slowmode)
|
|
@@ -372,7 +376,11 @@ async def dshell_get_thread(ctx: Message, message: Union[int, str] = None):
|
|
|
372
376
|
if message is None:
|
|
373
377
|
message = ctx.id
|
|
374
378
|
|
|
375
|
-
|
|
379
|
+
target_message = utils_get_message(ctx, message)
|
|
380
|
+
if isinstance(target_message, PartialMessage):
|
|
381
|
+
message = await target_message.fetch()
|
|
382
|
+
else:
|
|
383
|
+
message = target_message
|
|
376
384
|
|
|
377
385
|
if not hasattr(message, 'thread'):
|
|
378
386
|
return None
|
|
@@ -393,7 +401,11 @@ async def dshell_delete_thread(ctx: Message, thread: Union[int, str] = None, rea
|
|
|
393
401
|
if thread is None:
|
|
394
402
|
thread = ctx.id
|
|
395
403
|
|
|
396
|
-
|
|
404
|
+
target_message = utils_get_message(ctx, thread)
|
|
405
|
+
if isinstance(target_message, PartialMessage):
|
|
406
|
+
thread = await target_message.fetch()
|
|
407
|
+
else:
|
|
408
|
+
thread = target_message
|
|
397
409
|
|
|
398
410
|
if not hasattr(thread, 'thread'):
|
|
399
411
|
raise Exception("The specified message does not have a thread !")
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_message.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from re import search
|
|
2
2
|
|
|
3
|
-
from discord import Embed, Message
|
|
3
|
+
from discord import Embed, Message, PartialMessage
|
|
4
4
|
from discord.ext import commands
|
|
5
5
|
|
|
6
6
|
from pycordViews import EasyModifiedViews
|
|
@@ -258,10 +258,13 @@ async def dshell_get_content_message(ctx: Message, message=None):
|
|
|
258
258
|
|
|
259
259
|
target_message = ctx if message is None else utils_get_message(ctx, message)
|
|
260
260
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
261
|
+
if isinstance(target_message, PartialMessage):
|
|
262
|
+
try:
|
|
263
|
+
fetch_target_message = await target_message.fetch()
|
|
264
|
+
except:
|
|
265
|
+
raise Exception(f'Message not found !')
|
|
266
|
+
else:
|
|
267
|
+
fetch_target_message = target_message
|
|
265
268
|
|
|
266
269
|
return fetch_target_message.content
|
|
267
270
|
|
|
@@ -4,7 +4,7 @@ from re import search
|
|
|
4
4
|
|
|
5
5
|
from ..._DshellInterpreteur.cached_messages import dshell_cached_messages
|
|
6
6
|
|
|
7
|
-
def utils_get_message(ctx: Message, message: Union[int, str]) -> Union[PartialMessage]:
|
|
7
|
+
def utils_get_message(ctx: Message, message: Union[int, str]) -> Union[PartialMessage, Message]:
|
|
8
8
|
"""
|
|
9
9
|
Returns the message object of the specified message ID or link.
|
|
10
10
|
Message is only available in the same server as the command and in the same channel.
|
|
@@ -89,8 +89,14 @@ async def utils_get_author_id_message(ctx: Message, message: Optional[int] = Non
|
|
|
89
89
|
|
|
90
90
|
target_message = ctx
|
|
91
91
|
if message is not None:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
target_message = utils_get_message(ctx, message)
|
|
93
|
+
|
|
94
|
+
if isinstance(target_message, PartialMessage):
|
|
95
|
+
try:
|
|
96
|
+
target_message = await target_message.fetch()
|
|
97
|
+
except:
|
|
98
|
+
raise Exception(f"[message_author] Author ID message to get is not found !")
|
|
99
|
+
else:
|
|
100
|
+
target_message = ctx
|
|
101
|
+
|
|
96
102
|
return target_message.author.id
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="dshellInterpreter",
|
|
8
|
-
version="0.2.19.
|
|
8
|
+
version="0.2.19.5",
|
|
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-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_member.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/DISCORD_COMMANDS/dshell_role.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/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
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellInterpreteur/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellInterpreteur/errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellParser/dshell_parser.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellTokenizer/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/Dshell/_DshellTokenizer/dshell_keywords.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/dshellInterpreter.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/dshellInterpreter.egg-info/requires.txt
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.19.4 → dshellinterpreter-0.2.19.5}/dshellInterpreter.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|