Trello Ban System API - Token Overloaded

What we’re trying to achieve is a ban system using a Trello API that bans anyone inside a Trello Board by pasting their Roblox User ID. This works in small numbers while we were testing, but upon release, we realized that the Trello Ratelimit was bypassed (300 requests per second). We have tried making the wait function have a random interval to ease out the rate that the system is checking the board (and using the token/api), but after all that the token is still overloaded.

(This screenshot uses the same token that’s running on the game, It’s just for sample so the place doesn’t change anything)


We want to use the Trello Ban System because it would be more convenient to ban someone without getting on the game. I know in some sense this was the system that VetexGames used, but I don’t know how he made it work in large numbers.

This is the base script without the delay implementation. In the current instances of the game, we have wait(math.random(30,150)) to create a 30 second to a minute and a half delay range.

local API = require(game.ServerScriptService:WaitForChild("TrelloAPI"))
local BanBoardID = API:GetBoardID("Shounen Studio Game Moderation") --Name of de Ban Board
local BanListID = API:GetListID("Ban List", BanBoardID)
print("Ready")

game.Players.PlayerAdded:Connect(function() --Checks if Player is banned when they join the game
	print("function fired")
	local BanCards = API:GetCardsInList(BanListID)
	for _, Card in pairs(BanCards) do
		if string.find(Card.name, Player.UserId) then
			Player:Kick("You have been banned. Contact a Shounen Studios Game Admin to appeal.") --Ban Message when they Join the Game
		end
	end
end)

edit: would the pairs loop need to be delayed too?

Why not just store the bans inside of a datastore, and then post them to Trello just for logging purposes instead of saving all of the bans on Trello? Trello isn’t a database and it’s not meant to be used as one, and if someone were to delete all of the cards from your board and delete all of the bans, wheras if you stored them in a datastore you could easily just get all of your cards back with a simple loop. Additionally, I would recommend using the object oriented API made by @xelph_rs.

Yeah, looking at the API thread by @xelph_rs It seems the issue is that the rate limit was lowered a while back suddenly without people knowing. This would explain why a system that usually worked in so well in the past doesn’t work well anymore…
We’ll try using datastores I guess.

Could be too many requests.

Also it’s game.Players.PlayerAdded:Connect(function(Player) not game.Players.PlayerAdded:Connect(function()

2 Likes