dshellInterpreter 1.2.0.14__tar.gz → 1.2.0.15__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.
Files changed (53) hide show
  1. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_channel.py +3 -0
  2. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_message.py +4 -4
  3. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_global.py +30 -1
  4. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellTokenizer/dshell_keywords.py +2 -0
  5. {dshellinterpreter-1.2.0.14/dshellInterpreter.egg-info → dshellinterpreter-1.2.0.15}/PKG-INFO +1 -1
  6. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15/dshellInterpreter.egg-info}/PKG-INFO +1 -1
  7. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/setup.py +1 -1
  8. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
  9. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_embed.py +0 -0
  10. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_file.py +0 -0
  11. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_interaction.py +0 -0
  12. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
  13. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
  14. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
  15. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/dshell_ui.py +0 -0
  16. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
  17. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_embed.py +0 -0
  18. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_file.py +0 -0
  19. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_list.py +0 -0
  20. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_member.py +0 -0
  21. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +0 -0
  22. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_numbers.py +0 -0
  23. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_permissions.py +0 -0
  24. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_string.py +0 -0
  25. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
  26. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DISCORD_COMMANDS/utils/utils_type_validation.py +0 -0
  27. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellInterpreteur/__init__.py +0 -0
  28. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellInterpreteur/cached_messages.py +0 -0
  29. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellInterpreteur/dshell_arguments.py +0 -0
  30. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellInterpreteur/dshell_global_variables.py +0 -0
  31. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellInterpreteur/dshell_interpreter.py +0 -0
  32. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellInterpreteur/dshell_scope.py +0 -0
  33. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellInterpreteur/errors.py +0 -0
  34. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellInterpreteur/utils_interpreter.py +0 -0
  35. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellParser/__init__.py +0 -0
  36. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellParser/ast_nodes.py +0 -0
  37. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellParser/dshell_parser.py +0 -0
  38. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellParser/errors.py +0 -0
  39. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellPreProcess/__init__.py +0 -0
  40. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellPreProcess/dshell_preprocess.py +0 -0
  41. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellTokenizer/__init__.py +0 -0
  42. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellTokenizer/dshell_token_type.py +0 -0
  43. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/DshellTokenizer/dshell_tokenizer.py +0 -0
  44. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/__init__.py +0 -0
  45. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/full_import.py +0 -0
  46. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/Dshell/regex_test.py +0 -0
  47. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/LICENSE +0 -0
  48. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/README.md +0 -0
  49. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
  50. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
  51. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/dshellInterpreter.egg-info/requires.txt +0 -0
  52. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/dshellInterpreter.egg-info/top_level.txt +0 -0
  53. {dshellinterpreter-1.2.0.14 → dshellinterpreter-1.2.0.15}/setup.cfg +0 -0
@@ -117,6 +117,9 @@ async def dshell_get_channels_in_category(ctx: Message,
117
117
  elif regex is not None and search(regex, channel.name):
118
118
  channels.add(IntNode(channel.id))
119
119
 
120
+ else:
121
+ channels.add(IntNode(channel.id))
122
+
120
123
  return channels
121
124
 
122
125
  async def dshell_create_text_channel(ctx: Message,
@@ -52,16 +52,16 @@ __all__ = [
52
52
 
53
53
  async def dshell_send_message(ctx: Message,
54
54
  message: Optional[StrNode]=None,
55
- delete=None,
56
- channel=None,
55
+ delete: Optional[IntNode]=None,
56
+ channel: Optional[IntNode]=None,
57
57
  global_mentions: Optional[BoolNode] = None,
58
58
  everyone_mention: BoolNode = BoolNode(1),
59
59
  roles_mentions: BoolNode = BoolNode(1),
60
60
  users_mentions: BoolNode = BoolNode(1),
61
61
  reply_mention: BoolNode = BoolNode(0),
62
- embeds=None,
62
+ embeds: Optional[ListNode]=None,
63
63
  files: Optional[ListNode] = None,
64
- view=None) -> IntNode:
64
+ view: Optional[EasyModifiedViews]=None) -> IntNode:
65
65
  """
66
66
  Sends a message on Discord
67
67
  """
@@ -1,4 +1,5 @@
1
1
  __all__ = [
2
+ "utils_help",
2
3
  "utils_get_size",
3
4
  "utils_make_mention",
4
5
  "utils_len",
@@ -38,7 +39,6 @@ from .utils_type_validation import (_validate_optional_list_node,
38
39
  _validate_required_int,
39
40
  _validate_required_string)
40
41
 
41
-
42
42
  class DiscordType(StrEnum):
43
43
  MEMBER = "member"
44
44
  ROLE = "role"
@@ -49,6 +49,35 @@ class DiscordType(StrEnum):
49
49
  THREAD = "thread"
50
50
  UNKNOWN = "unknown"
51
51
 
52
+ async def utils_help(ctx: Message, command: StrNode) -> StrNode:
53
+ """
54
+ Renvoie l'aide associé à une commande
55
+ :param ctx:
56
+ :param command:
57
+ :return:
58
+ """
59
+ _CMD = "help"
60
+
61
+ _validate_required_string(command, "command", _CMD)
62
+
63
+ from inspect import signature, Parameter
64
+ from ...DshellTokenizer.dshell_keywords import dshell_commands
65
+
66
+ if command not in dshell_commands:
67
+ raise ValueError(f"[HELP] command not found : '{command}'")
68
+
69
+ sig = signature(dshell_commands[command])
70
+ result = StrNode("## HELP `{command}`")
71
+
72
+ for nom, param in sig.parameters.items():
73
+ if nom == "ctx":
74
+ continue
75
+
76
+ result += StrNode(f"""
77
+ --{nom} [{param.default if param.default != Parameter.empty else "REQUIRED"}] -> {param.annotation}
78
+ """)
79
+ return result
80
+
52
81
  async def utils_get_size(ctx: Message, target: Any):
53
82
  """
54
83
  Récupère la taille de l'objet
@@ -39,6 +39,8 @@ dshell_commands: dict[str, Callable] = {
39
39
  ## global utils
40
40
  'random': utils_random,
41
41
  'size': utils_get_size,
42
+ 'help': utils_help,
43
+ 'h': utils_help,
42
44
 
43
45
  ## List utils
44
46
  'list': utils_convert_to_list,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dshellInterpreter
3
- Version: 1.2.0.14
3
+ Version: 1.2.0.15
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: 1.2.0.14
3
+ Version: 1.2.0.15
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="1.2.0.14",
8
+ version="1.2.0.15",
9
9
  author="Chronos",
10
10
  author_email="vagabonwalybi@gmail.com",
11
11
  description="A Discord bot interpreter for creating custom commands and automations.",