dshellInterpreter 0.2.13.10__tar.gz → 0.2.13.11__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 (30) hide show
  1. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellInterpreteur/dshell_interpreter.py +17 -16
  2. {dshellinterpreter-0.2.13.10/dshellInterpreter.egg-info → dshellinterpreter-0.2.13.11}/PKG-INFO +1 -1
  3. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11/dshellInterpreter.egg-info}/PKG-INFO +1 -1
  4. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/setup.py +1 -1
  5. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
  6. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/dshell_channel.py +0 -0
  7. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
  8. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/dshell_message.py +0 -0
  9. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
  10. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
  11. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
  12. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +0 -0
  13. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
  14. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellInterpreteur/__init__.py +0 -0
  15. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellParser/__init__.py +0 -0
  16. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellParser/ast_nodes.py +0 -0
  17. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellParser/dshell_parser.py +0 -0
  18. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellTokenizer/__init__.py +0 -0
  19. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellTokenizer/dshell_keywords.py +0 -0
  20. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellTokenizer/dshell_token_type.py +0 -0
  21. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_DshellTokenizer/dshell_tokenizer.py +0 -0
  22. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/__init__.py +0 -0
  23. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/Dshell/_utils.py +0 -0
  24. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/LICENSE +0 -0
  25. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/README.md +0 -0
  26. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
  27. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
  28. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/dshellInterpreter.egg-info/requires.txt +0 -0
  29. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/dshellInterpreter.egg-info/top_level.txt +0 -0
  30. {dshellinterpreter-0.2.13.10 → dshellinterpreter-0.2.13.11}/setup.cfg +0 -0
@@ -37,24 +37,25 @@ class DshellInterpreteur:
37
37
  :param vars: Optional dictionary of variables to initialize in the interpreter's environment.
38
38
  """
39
39
  self.ast: list[ASTNode] = parse(DshellTokenizer(code).start(), StartNode([]))[0]
40
+ message = ctx.message if isinstance(ctx, Interaction) else ctx
40
41
  self.env: dict[str, Any] = {
41
42
  '__ret__': None, # environment variables, '__ret__' is used to store the return value of commands
42
- '__guild__': ctx.channel.guild.name,
43
- '__channel__': ctx.channel.name,
44
- '__author__': ctx.author.name,
45
- '__author_display_name__': ctx.author.display_name,
46
- '__author_avatar__': ctx.author.display_avatar.url if ctx.author.display_avatar else None,
47
- '__author_discriminator__': ctx.author.discriminator,
48
- '__author_bot__': ctx.author.bot,
49
- '__author_nick__': ctx.author.nick if hasattr(ctx.author, 'nick') else None,
50
- '__author_id__': ctx.author.id,
51
- '__message__': ctx.content,
52
- '__message_id__': ctx.id,
53
- '__channel_name__': ctx.channel.name,
54
- '__channel_type__': ctx.channel.type.name if hasattr(ctx.channel, 'type') else None,
55
- '__channel_id__': ctx.channel.id,
56
- '__private_channel__': isinstance(ctx.channel, PrivateChannel),
57
- } if ctx is not None else {}
43
+ '__guild__': message.channel.guild.name,
44
+ '__channel__': message.channel.name,
45
+ '__author__': message.author.name,
46
+ '__author_display_name__': message.author.display_name,
47
+ '__author_avatar__': message.author.display_avatar.url if message.author.display_avatar else None,
48
+ '__author_discriminator__': message.author.discriminator,
49
+ '__author_bot__': message.author.bot,
50
+ '__author_nick__': message.author.nick if hasattr(message.author, 'nick') else None,
51
+ '__author_id__': message.author.id,
52
+ '__message__': message.content,
53
+ '__message_id__': message.id,
54
+ '__channel_name__': message.channel.name,
55
+ '__channel_type__': message.channel.type.name if hasattr(message.channel, 'type') else None,
56
+ '__channel_id__': message.channel.id,
57
+ '__private_channel__': isinstance(message.channel, PrivateChannel),
58
+ } if message is not None else {}
58
59
  self.vars = vars if vars is not None else ''
59
60
  self.ctx: context = ctx
60
61
  if debug:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dshellInterpreter
3
- Version: 0.2.13.10
3
+ Version: 0.2.13.11
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.13.10
3
+ Version: 0.2.13.11
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.13.10",
8
+ version="0.2.13.11",
9
9
  author="Chronos",
10
10
  author_email="vagabonwalybi@gmail.com",
11
11
  description="A Discord bot interpreter for creating custom commands and automations.",