From 209a1af548c0b9e263965055f5fa20605e9ab4b5 Mon Sep 17 00:00:00 2001 From: BakersBakeBread Date: Mon, 4 Oct 2021 10:24:34 +0100 Subject: [PATCH] Check components is list before length check --- dislash/interactions/interaction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dislash/interactions/interaction.py b/dislash/interactions/interaction.py index 0108a66..1dbf3c4 100644 --- a/dislash/interactions/interaction.py +++ b/dislash/interactions/interaction.py @@ -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):