dshellInterpreter 0.1.20__tar.gz → 0.1.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.

Potentially problematic release.


This version of dshellInterpreter might be problematic. Click here for more details.

Files changed (24) hide show
  1. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/DISCORD_COMMANDS/dshell_message.py +2 -2
  2. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellTokenizer/dshell_tokenizer.py +4 -4
  3. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/PKG-INFO +1 -1
  4. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/dshellInterpreter.egg-info/PKG-INFO +1 -1
  5. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/setup.py +1 -1
  6. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
  7. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/DISCORD_COMMANDS/dshell_channel.py +0 -0
  8. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
  9. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellInterpreteur/__init__.py +0 -0
  10. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellInterpreteur/dshell_interpreter.py +0 -0
  11. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellParser/__init__.py +0 -0
  12. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellParser/ast_nodes.py +0 -0
  13. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellParser/dshell_parser.py +0 -0
  14. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellTokenizer/__init__.py +0 -0
  15. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellTokenizer/dshell_keywords.py +0 -0
  16. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/_DshellTokenizer/dshell_token_type.py +0 -0
  17. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/Dshell/__init__.py +0 -0
  18. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/LICENSE +0 -0
  19. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/README.md +0 -0
  20. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
  21. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
  22. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/dshellInterpreter.egg-info/requires.txt +0 -0
  23. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/dshellInterpreter.egg-info/top_level.txt +0 -0
  24. {dshellinterpreter-0.1.20 → dshellinterpreter-0.1.22}/setup.cfg +0 -0
@@ -106,12 +106,12 @@ async def dshell_research_regex_message(ctx: Message, regex, channel=None):
106
106
 
107
107
  return messages
108
108
 
109
- async def dshell_research_regex_in_content(ctx: Message, regex, content):
109
+ async def dshell_research_regex_in_content(ctx: Message, regex, content=None):
110
110
  """
111
111
  Searches for a regex in a specific message content
112
112
  """
113
113
 
114
- if not search(regex, content):
114
+ if not search(regex, content if content is not None else ctx.content):
115
115
  return False
116
116
 
117
117
  return True
@@ -70,10 +70,6 @@ class DshellTokenizer:
70
70
  token = Token(token_type, match.group(1), (line_number, match.start())) # on enregistre son token
71
71
  tokens_par_ligne.append(token)
72
72
 
73
- len_match = len(match.group(0))
74
- ligne = ligne[:match.start()] + (MASK_CHARACTER * len_match) + ligne[
75
- match.end():] # remplace la match qui vient d'avoir lieu pour ne pas le rematch une seconde fois
76
-
77
73
  if token_type in (
78
74
  DTT.LIST,
79
75
  DTT.CALL_ARGS): # si c'est un regrouppement de donnée, on tokenize ce qu'il contient
@@ -81,6 +77,10 @@ class DshellTokenizer:
81
77
  token.value = result[0] if len(
82
78
  result) > 0 else result # gère si la structure de donnée est vide ou non
83
79
 
80
+ len_match = len(match.group(0))
81
+ ligne = ligne[:match.start()] + (MASK_CHARACTER * len_match) + ligne[
82
+ match.end():] # remplace la match qui vient d'avoir lieu pour ne pas le rematch une seconde fois
83
+
84
84
  tokens_par_ligne.sort(key=lambda
85
85
  token: token.position[1]) # trie la position par rapport aux positions de match des tokens pour les avoir dans l'ordre du code
86
86
  if tokens_par_ligne:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dshellInterpreter
3
- Version: 0.1.20
3
+ Version: 0.1.22
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.1.20
3
+ Version: 0.1.22
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.1.20",
8
+ version="0.1.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.",