Trello API :AddCard() No Parameters Found Error

So I’ve tried googling this error while using the API references and documentation but it does not seem to want to work. I am not sure If I am doing this correctly but… I need some help.

local trello = require(script.Parent.TrelloAPI)
local board = trello:GetBoardID(“Panel”)
local ListID = trello:GetListID(“Banned”,board)
print(board, ListID)
local newcard = trello:AddCard(“”…reason ,“”…desc,ListID)

20:37:38.191 - ServerScriptService.TrelloAPI:812: No Parameters Found!

20:37:38.192 - Stack Begin

20:37:38.192 - Script ‘ServerScriptService.TrelloAPI’, Line 812 - function AddCard

20:37:38.192 - Script ‘ServerScriptService.Engine’, Line 9

20:37:38.193 - Stack End

do reason instead of ""..reason and the same thing with desc. Putting “” makes no difference.

That is not how varargs work. You can’t index them like that (if that is what you’re trying).
A solution to this is having this line before the code:

local args = {...}

And then you can get your variables reason and desc from there. For example if reason is the first index in the arguments and desc the second, then:

local newcard = trello:AddCard(args[1], args[2], ListID)

This is based on my assumption that you’re trying to use varargs like that. If not, this answer can be deemed irrelevant.

It looks like he meant to use .. instead of ... to try to cast a value into a string by concatenating with an empty string. If that’s the case then it would make more sense to just use tostring

still happens

But is it varargs you’re using?
Try printing reason, desc and ListID before calling the AddCard method. If one is nil, that’s a problem.

1 Like

yeah i did and ListID is showing nil I do not know why and how to repair this?

I’ve done the things I am aware of to try and fix it

It seems that GetListID returns nil if it cannot find a list with given name in the board.

Have you tried printing your boardID to see if that’s correct?

Yeah I’ve tried printing board but it shows " 5e30c595e03259142c929674"
I am not sure if it is supposed to print like that.

Okay so, if you go to on the account that you’re using for your bot, does the board exist and is there a list called “Banned”?

yea its there

Are you checking this on your bot’s account or your own account?

It may be possible that your API token does not have the necessary permissions to read from your account (and thus it cannot see lists).

how do i check my bots account if it has access to read? I am pretty sure because I’ve authorized it following instructions in the trello api

Login on the Trello account you generated an API token for and check if the list is visible?

Just as a general recommendation, it is ill-advised to use Trello as a database due to its speed lagging behind that of regular databases. It’s also just not meant to be used as a database.

still I want to use Trello though…

I am so confused why is ListID still showing nil

If you’re using the Trello API module by nstrike, I’d suggest finding a different module.

Though that one works, It’s quite old, and doesn’t respect any Trello site-wide rate limits.

As for your issue, I’m not sure what ""..reason is for, if reason is already a string? I also don’t see your desc variable defined anywhere.

But it should be this:
local newcard = trello:AddCard(reason, desc, ListID)

And the Trello API code, requires at least 3 parameters in AddCard or it will do that error.