dshellInterpreter 0.2.4.2__tar.gz → 0.2.4.4__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.
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_role.py +12 -9
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/__init__.py +1 -0
- dshellinterpreter-0.2.4.4/Dshell/_utils.py +1 -0
- {dshellinterpreter-0.2.4.2/dshellInterpreter.egg-info → dshellinterpreter-0.2.4.4}/PKG-INFO +1 -1
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4/dshellInterpreter.egg-info}/PKG-INFO +1 -1
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/dshellInterpreter.egg-info/SOURCES.txt +1 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/setup.py +1 -1
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_channel.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_message.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellInterpreteur/__init__.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellInterpreteur/dshell_interpreter.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellParser/__init__.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellParser/ast_nodes.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellParser/dshell_parser.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellTokenizer/__init__.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellTokenizer/dshell_keywords.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellTokenizer/dshell_token_type.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellTokenizer/dshell_tokenizer.py +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/LICENSE +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/README.md +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/dshellInterpreter.egg-info/requires.txt +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/dshellInterpreter.egg-info/top_level.txt +0 -0
- {dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/setup.cfg +0 -0
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_role.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from discord import MISSING, Message, PermissionOverwrite
|
|
2
2
|
from discord.utils import _MissingSentinel
|
|
3
|
+
from .._utils import NoneType
|
|
3
4
|
|
|
4
5
|
__all__ = [
|
|
5
6
|
'dshell_create_role',
|
|
@@ -26,7 +27,8 @@ async def dshell_create_role(ctx: Message,
|
|
|
26
27
|
|
|
27
28
|
from .._DshellInterpreteur.dshell_interpreter import build_colour
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
if not isinstance(color, _MissingSentinel):
|
|
31
|
+
color = build_colour(color)
|
|
30
32
|
|
|
31
33
|
if not isinstance(hoist, (bool, _MissingSentinel)):
|
|
32
34
|
raise Exception(f"Hoist must be a boolean, not {type(permissions)} !")
|
|
@@ -41,7 +43,7 @@ async def dshell_create_role(ctx: Message,
|
|
|
41
43
|
|
|
42
44
|
created_role = await ctx.guild.create_role(name=name,
|
|
43
45
|
permissions=permissions,
|
|
44
|
-
colour=
|
|
46
|
+
colour=color,
|
|
45
47
|
hoist=hoist,
|
|
46
48
|
mentionable=mentionable,
|
|
47
49
|
reason=str(reason))
|
|
@@ -87,10 +89,10 @@ async def dshell_edit_role(ctx: Message,
|
|
|
87
89
|
|
|
88
90
|
role_to_edit = ctx.guild.get_role(role)
|
|
89
91
|
|
|
90
|
-
if not isinstance(name, (str,
|
|
92
|
+
if not isinstance(name, (str, NoneType)):
|
|
91
93
|
raise Exception(f"Name must be a string, not {type(name)} !")
|
|
92
94
|
|
|
93
|
-
if not isinstance(permissions, (dict,
|
|
95
|
+
if not isinstance(permissions, (dict, NoneType)):
|
|
94
96
|
raise Exception(f"Permissions must be a PermissionNode, not {type(permissions)} !")
|
|
95
97
|
|
|
96
98
|
if isinstance(permissions, dict):
|
|
@@ -100,20 +102,21 @@ async def dshell_edit_role(ctx: Message,
|
|
|
100
102
|
|
|
101
103
|
from .._DshellInterpreteur.dshell_interpreter import build_colour
|
|
102
104
|
|
|
103
|
-
|
|
105
|
+
if color is not None:
|
|
106
|
+
color = build_colour(color)
|
|
104
107
|
|
|
105
|
-
if not isinstance(hoist, (bool,
|
|
108
|
+
if not isinstance(hoist, (bool, NoneType)):
|
|
106
109
|
raise Exception(f"Hoist must be a boolean, not {type(permissions)} !")
|
|
107
110
|
|
|
108
|
-
if not isinstance(mentionable, (bool,
|
|
111
|
+
if not isinstance(mentionable, (bool, NoneType)):
|
|
109
112
|
raise Exception(f"Mentionable must be a boolean, not {type(permissions)} !")
|
|
110
113
|
|
|
111
|
-
if not isinstance(position, (int,
|
|
114
|
+
if not isinstance(position, (int, NoneType)):
|
|
112
115
|
raise Exception(f"Position must be an integer, not {type(permissions)} !")
|
|
113
116
|
|
|
114
117
|
await role_to_edit.edit(name=name if name is not None else role_to_edit.name,
|
|
115
118
|
permissions=permissions if permissions is not None else role_to_edit.permissions,
|
|
116
|
-
colour=
|
|
119
|
+
colour=color if color is not None else role_to_edit.colour,
|
|
117
120
|
hoist=hoist if hoist is not None else role_to_edit.hoist,
|
|
118
121
|
mentionable=mentionable if mentionable is not None else role_to_edit.mentionable,
|
|
119
122
|
position=position if position is not None else role_to_edit.position,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
NoneType = type(None)
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="dshellInterpreter",
|
|
8
|
-
version="0.2.4.
|
|
8
|
+
version="0.2.4.4",
|
|
9
9
|
author="Chronos",
|
|
10
10
|
author_email="vagabonwalybi@gmail.com",
|
|
11
11
|
description="A Discord bot interpreter for creating custom commands and automations.",
|
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_channel.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_member.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_message.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellInterpreteur/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellParser/dshell_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellTokenizer/dshell_keywords.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellTokenizer/dshell_token_type.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/Dshell/_DshellTokenizer/dshell_tokenizer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/dshellInterpreter.egg-info/requires.txt
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.4.2 → dshellinterpreter-0.2.4.4}/dshellInterpreter.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|