Skip to content

Commit 9b7f1ff

Browse files
committed
2 parents 2692f67 + 444791a commit 9b7f1ff

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

discord_slash/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
"""
22
discord-py-slash-command
33
~~~~~~~~~~~~~~~~~~~~~~~~
4-
54
Simple Discord Slash Command extension for discord.py
6-
75
:copyright: (c) 2020-2021 eunwoo1104
86
:license: MIT
97
"""
108

119
from .client import SlashCommand # noqa: F401
1210
from .const import __version__ # noqa: F401
13-
from .context import ComponentContext, SlashContext, MenuContext # noqa: F401
11+
from .context import ComponentContext, MenuContext, SlashContext # noqa: F401
1412
from .dpy_overrides import ComponentMessage # noqa: F401
1513
from .model import ButtonStyle, ComponentType, SlashCommandOptionType # noqa: F401
1614
from .utils import manage_commands # noqa: F401

discord_slash/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ async def to_dict(self):
373373
queue = {}
374374
base_dict = {
375375
"name": y,
376-
"description": "No Description.",
376+
"description": "No Description.",
377377
"type": model.SlashCommandOptionType.SUB_COMMAND_GROUP,
378378
"options": [],
379379
}
@@ -656,12 +656,12 @@ def add_context_menu(self, cmd, name: str, _type: int, guild_ids: list = None):
656656
raise error.IncorrectGuildIDType(
657657
f"The snowflake IDs {guild_ids} given are not a list of integers. Because of discord.py convention, please use integer IDs instead. Furthermore, the command '{name}' will be deactivated and broken until fixed."
658658
)
659-
659+
660660
if name in self.commands["context"]:
661661
tgt = self.commands["context"][name]
662662
if not tgt.has_subcommands:
663663
raise error.DuplicateCommand(name)
664-
has_subcommands = tgt.has_subcommands # noqa
664+
has_subcommands = tgt.has_subcommands # noqa
665665
for x in tgt.allowed_guild_ids:
666666
if x not in guild_ids:
667667
guild_ids.append(x)
@@ -1443,7 +1443,7 @@ async def _on_context_menu(self, to_use):
14431443
if to_use["data"]["name"] in self.commands["context"]:
14441444
ctx = context.SlashContext(self.req, to_use, self._discord, self.logger)
14451445
cmd_name = to_use["data"]["name"]
1446-
1446+
14471447
if cmd_name not in self.commands["context"] and cmd_name in self.subcommands:
14481448
return await self.handle_subcommand(ctx, to_use)
14491449

discord_slash/cog_ext.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ def wrapper(cmd):
188188

189189
return wrapper
190190

191+
191192
def cog_context_menu(target: int, name: str, guild_ids: list = None):
192193
"""
193194
Decorator that adds context menu commands.
@@ -227,6 +228,7 @@ def wrapper(cmd):
227228

228229
return wrapper
229230

231+
230232
def permission(guild_id: int, permissions: list):
231233
"""
232234
Decorator that add permissions. This will set the permissions for a single guild, you can use it more than once for each command.

0 commit comments

Comments
 (0)