Skip to content
This repository was archived by the owner on Dec 26, 2021. It is now read-only.

Check components is list before length check #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dislash/interactions/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,9 @@ async def create_response(
_components = None

if components is not None:
if len(components) > 5:
if not isinstance(components, list) or len(components) > 5:
raise discord.InvalidArgument("components must be a list of up to 5 action rows")

_components = _components or []
for comp in components:
if isinstance(comp, ActionRow):
Expand Down