Skip to content

Commit

Permalink
hotfix /pin get_all
Browse files Browse the repository at this point in the history
forum channel doesn't have pins
  • Loading branch information
solumath committed May 19, 2023
1 parent d0bd24f commit 5f8051f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion cogs/autopin.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ async def get_all(
self,
inter: disnake.ApplicationCommandInteraction,
channel: pin_channel_type = None,
type: str = commands.Param(description="file type", choices=["json", "markdown"], default="markdown")
type: str = commands.Param(
description="Typ výstupu. Markdown/JSON",
choices=["json", "markdown"],
default="markdown"
)
):
"""Get all pins from channel and send it to user in markdown file"""
channel = inter.channel if channel is None else channel
Expand Down
3 changes: 1 addition & 2 deletions features/autopin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

pin_channel_type = Union[
disnake.TextChannel,
disnake.Thread,
disnake.ForumChannel
disnake.Thread
]


Expand Down

0 comments on commit 5f8051f

Please sign in to comment.