dshellInterpreter 0.1.8__tar.gz → 0.1.9__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 (23) hide show
  1. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/DISCORD_COMMANDS/dshell_message.py +0 -1
  2. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellInterpreteur/dshell_interpreter.py +7 -6
  3. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellParser/ast_nodes.py +1 -2
  4. {dshellinterpreter-0.1.8/dshellInterpreter.egg-info → dshellinterpreter-0.1.9}/PKG-INFO +1 -1
  5. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9/dshellInterpreter.egg-info}/PKG-INFO +1 -1
  6. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/setup.py +1 -1
  7. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
  8. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/DISCORD_COMMANDS/dshell_channel.py +0 -0
  9. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellInterpreteur/__init__.py +0 -0
  10. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellParser/__init__.py +0 -0
  11. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellParser/dshell_parser.py +0 -0
  12. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellTokenizer/__init__.py +0 -0
  13. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellTokenizer/dshell_keywords.py +0 -0
  14. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellTokenizer/dshell_token_type.py +0 -0
  15. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/_DshellTokenizer/dshell_tokenizer.py +0 -0
  16. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/Dshell/__init__.py +0 -0
  17. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/LICENSE +0 -0
  18. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/README.md +0 -0
  19. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
  20. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
  21. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/dshellInterpreter.egg-info/requires.txt +0 -0
  22. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/dshellInterpreter.egg-info/top_level.txt +0 -0
  23. {dshellinterpreter-0.1.8 → dshellinterpreter-0.1.9}/setup.cfg +0 -0
@@ -1,7 +1,6 @@
1
1
  from discord import Embed
2
2
  from discord.abc import GuildChannel
3
3
 
4
-
5
4
  __all__ = [
6
5
  'dshell_send_message',
7
6
  'dshell_delete_message',
@@ -288,7 +288,6 @@ class DshellIterator:
288
288
  return self
289
289
 
290
290
  def __next__(self):
291
-
292
291
  if self.current >= len(self.data):
293
292
  self.current = 0
294
293
  raise StopIteration
@@ -373,21 +372,23 @@ class DshellPermissions:
373
372
  target_keys = self.target.keys()
374
373
 
375
374
  if 'members' in target_keys:
376
- for member_id in DshellIterator(self.target['members']):
375
+ for member_id in (
376
+ self.target['members'] if isinstance(self.target['members'], ListNode) else [self.target['members']]): # accepte un seul ID
377
377
  member = self.get_member(guild, member_id)
378
378
  permissions[member] = PermissionOverwrite.from_pair(
379
379
  allow=Permissions(permissions=self.target.get('allow', 0)),
380
- deny= Permissions(permissions=self.target.get('deny', 0))
380
+ deny=Permissions(permissions=self.target.get('deny', 0))
381
381
  )
382
382
 
383
383
  elif 'roles' in target_keys:
384
- for role_id in DshellIterator(self.target['roles']):
384
+ for role_id in (
385
+ self.target['roles'] if isinstance(self.target['roles'], ListNode) else [self.target['roles']]): ## accepte un seul ID
385
386
  role = self.get_role(guild, role_id)
386
387
  permissions[role] = PermissionOverwrite.from_pair(
387
388
  allow=Permissions(permissions=self.target.get('allow', 0)),
388
- deny= Permissions(permissions=self.target.get('deny', 0))
389
+ deny=Permissions(permissions=self.target.get('deny', 0))
389
390
  )
390
391
  else:
391
392
  raise ValueError("Aucun membre ou rôle spécifié dans les permissions.")
392
393
 
393
- return permissions
394
+ return permissions
@@ -1,8 +1,7 @@
1
- from typing import Optional, Any, TYPE_CHECKING
1
+ from typing import Optional, Any
2
2
 
3
3
  from .._DshellTokenizer.dshell_token_type import Token
4
4
 
5
-
6
5
  __all__ = [
7
6
  'ASTNode',
8
7
  'StartNode',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dshellInterpreter
3
- Version: 0.1.8
3
+ Version: 0.1.9
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.8
3
+ Version: 0.1.9
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.8",
8
+ version="0.1.9",
9
9
  author="Chronos",
10
10
  author_email="vagabonwalybi@gmail.com",
11
11
  description="A Discord bot interpreter for creating custom commands and automations.",