EQUENOS / dislash.py

A Python wrapper for discord slash-commands and buttons, designed to extend discord.py.

Home Page:https://dislashpy.readthedocs.io/en/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: object of type 'ActionRow' has no len()

v1s1t0r999 opened this issue · comments

NOTE: ONLY HAPPENS IN COGS
The Code:

from dislash import *
@commands.command()
async def cmd(self,ctx,arg):
	row = ActionRow(
		Button(style=ButtonStyle.green, label="My Label Here!!", custom_id="tx")
	)
	def check(inter):
		return inter.author == ctx.author and inter.author.guild_permissions.manage_emojis
	try:
		# SOME SHIT HERE!!
	except:
		# COUNTER

Precise Output in the Terminal:

File "/MY_DIRS/python/lib/python3.9/site-packages/dislash/application_commands/_modifications/old.py", line 105, in send_with_components
     if len(components) > 5:
TypeError: object of type 'ActionRow' has no len()

EDIT: Markdown changes

commented

ActionRow.components is the list
IMG_20210908_203208

So is it:

await ctx.send("A Message With Buttons using dislash",components = [row])