dshellInterpreter 0.2.18.1__tar.gz → 0.2.18.3__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.

Files changed (37) hide show
  1. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/dshell_channel.py +2 -0
  2. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/dshell_message.py +6 -1
  3. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellInterpreteur/dshell_interpreter.py +3 -2
  4. {dshellinterpreter-0.2.18.1/dshellInterpreter.egg-info → dshellinterpreter-0.2.18.3}/PKG-INFO +1 -1
  5. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3/dshellInterpreter.egg-info}/PKG-INFO +1 -1
  6. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/setup.py +1 -1
  7. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
  8. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/dshell_interaction.py +0 -0
  9. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
  10. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
  11. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
  12. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
  13. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/utils/utils_global.py +0 -0
  14. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/utils/utils_list.py +0 -0
  15. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/utils/utils_member.py +0 -0
  16. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +0 -0
  17. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/utils/utils_permissions.py +0 -0
  18. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/utils/utils_string.py +0 -0
  19. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
  20. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellInterpreteur/__init__.py +0 -0
  21. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellInterpreteur/errors.py +0 -0
  22. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellParser/__init__.py +0 -0
  23. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellParser/ast_nodes.py +0 -0
  24. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellParser/dshell_parser.py +0 -0
  25. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellTokenizer/__init__.py +0 -0
  26. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellTokenizer/dshell_keywords.py +0 -0
  27. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellTokenizer/dshell_token_type.py +0 -0
  28. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_DshellTokenizer/dshell_tokenizer.py +0 -0
  29. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/__init__.py +0 -0
  30. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/Dshell/_utils.py +0 -0
  31. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/LICENSE +0 -0
  32. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/README.md +0 -0
  33. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
  34. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
  35. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/dshellInterpreter.egg-info/requires.txt +0 -0
  36. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/dshellInterpreter.egg-info/top_level.txt +0 -0
  37. {dshellinterpreter-0.2.18.1 → dshellinterpreter-0.2.18.3}/setup.cfg +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)} !")
@@ -252,6 +252,11 @@ async def dshell_get_content_message(ctx: Message, message=None):
252
252
 
253
253
  target_message = ctx if message is None else utils_get_message(ctx, message)
254
254
 
255
- return target_message.content
255
+ try:
256
+ fetch_target_message = await target_message.fetch()
257
+ except:
258
+ raise Exception(f'Message not found !')
259
+
260
+ return fetch_target_message.content
256
261
 
257
262
 
@@ -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 == DTT.IDENT: # Check if it's a separator and if the next token is an IDENT
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 == DTT.IDENT and
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dshellInterpreter
3
- Version: 0.2.18.1
3
+ Version: 0.2.18.3
4
4
  Summary: A Discord bot interpreter for creating custom commands and automations.
5
5
  Home-page: https://github.com/BOXERRMD/Dshell_Interpreter
6
6
  Author: Chronos
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dshellInterpreter
3
- Version: 0.2.18.1
3
+ Version: 0.2.18.3
4
4
  Summary: A Discord bot interpreter for creating custom commands and automations.
5
5
  Home-page: https://github.com/BOXERRMD/Dshell_Interpreter
6
6
  Author: Chronos
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="dshellInterpreter",
8
- version="0.2.18.1",
8
+ version="0.2.18.3",
9
9
  author="Chronos",
10
10
  author_email="vagabonwalybi@gmail.com",
11
11
  description="A Discord bot interpreter for creating custom commands and automations.",