I mean it gets down to the 3rd one. Here is the output. It doesn’t error I don’t see it anywhere.
A word of advise that will make your code better, use breakpoints in the future. Prints are messy.
You didn’t close a majority of your functions, add more end)
s
At least I’m pretty sure this is the problem, I’ve always closed mine so idk if it makes a difference.
I had that problem and it turns out that the GetCardId doesn’t want ?key but &key and the line that calls getAddon() sets the addon bit to the unwanted ?key for the card. Solution was to set a new line called anything in this case Hide that will update itself based on what is returned from getAddon() which is the correct &key
function T:GetCardID(name,boardid)
local url
if Private then
local Hide = getAddon()
url="https://api.trello.com/1/lists/"..boardid.."/cards?fields=id,name&"..Hide
else
local Hide = getAddon()
url="https://api.trello.com/1/lists/"..boardid.."/cards?fields=id,name&"..Hide
end
local tab=HS:GetAsync(url,true)
local tabl=HS:JSONDecode(tab)
for k,ta in pairs(tabl) do
for p,t in pairs(ta) do
if p=="name" and t==name then
return ta.id
else
return nil
end
end
end
end
function T:GetCardID(name,boardid)
local url
if Private then
getAddon()
url="https://api.trello.com/1/boards/"..boardid.."/cards"..addon
else
getAddon()
url="https://api.trello.com/1/boards/"..boardid.."/cards"..addon
end
local tab=HS:GetAsync(url,true)
local tabl=HS:JSONDecode(tab)
for k,ta in pairs(tabl) do
for p,t in pairs(ta) do
if p=="name" and t==name then
return ta.id
end
end
end
end
This is the original and you can check by printing addon after both of the "url="https://api.trello.com/1/boards/“..boardid..”/cards"..addon" that it will send you the ?key and not required &key for the getcardid. I assume its a typo by OP.
can you make a new tutorial? this does not work at all
Is it possible to get the Id of a card that I just recently created?
I’ve tried using your solution but didn’t solve the issue I’m facing.
local ListID = TrelloAPI:GetListID("RandomList", BoardID)
local CardID = TrelloAPI:GetCardID("RandomCard", BoardID)
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local Text = player.Name .. ' Has Joined Akr Cafe!'
TrelloAPI:PostComment(CardID, Text)
print(Text)
end)
Players.PlayerRemoving:Connect(function(player)
local Text = player.Name .. ' Has Left Akr Cafe!'
TrelloAPI:PostComment(CardID, Text)
print(Text)
end)
For me if a player leaves it posts a comment but then the player joins [PlayerAdded] it doesn’t do anything. I’ve tried adding wait, waitforchilds, although those don’t seem to help. I’ve haven’t gotten any errors, prints as well on the PlayerAdded function which leaves me extremely baffled.
Have you tried adding a print
before the TrelloAPI:PostComment()
in PlayerAdded to check if the event is even being fired?
Yep although it won’t post. I’ve added a wait and it prints after the wait but does not post the comment.
Have you tried adding a really long wait before PostComment
(something like wait(60)
)? If you’re using something else with Trello too (e.g. Adonis Admin) you might be hitting rate limits and not realising.
How can I get all the card names in a list?
Sorry for the late response, I’ve tried adding a 6 minute wait and it works, thank you!
I have found this today and have a question:
I want to create a checklist on the card. I know that there is the function “AddCheckList()”, but I do not know how to use it because there are no arguments given.
May someone help me?
local API = require(game.ServerScriptService:WaitForChild(“TrelloAPI”))
local BoardID = API:GetBoardID(“ßBOARD NAME”)
local ListID = API:GetListID(“LIST NAME”,BoardID)
local List = API:GetCardsInList(LIstID)
for _, Card in pairs(List) do
print(Card.name)
end
Hello, how do I create a trello card through roblox, as I would need to know how to make it so when you select a player on a GUI then press a certain button, it will add them to a certain list how can I go about this?
you should’ve read the documentation, it’s here:
https://getenveloped.com/trelloapi/detail.php?resource=AddCard
Thanks! Btw, i am struggling with getting a random card name
What do you mean?
Do you mean to get a name of a card or create a new part with a random name?