local Players = game:GetService('Players')
Players:BanAsync({
UserIds = {USER_IDS_HERE},
ApplyToUniverse = true, -- whether the banned players should get kicked from every place in the game
Duration = 60, -- time in seconds
DisplayReason = 'reason to be shown to the player',
PrivateReason = 'reason that will be shown in the ban history',
ExcludeAltAccounts = false, -- whether alt checking should be disabled or not (boolean)
})
THANK YOU!!! This might just make things wayyyyy easier.
I have a question, what if someone requests a Right to Be Forgotton request, do we have to unban them from the game? And would they be able to join on alts?
And one last question…
If I were to ban someone, let’s use Jake as an example. (jake is a random eprson just amde up now). If I ban him using a -ban command I made for it to ban him using BanAsync, would it kick him from that game, or does the ban only take affect once he rejoins?
Pretty sure that’s not the case. Although roblox might just remove the ban automatically without sending you a request.
Idea for the future would be flagging accounts that got a certain amount of bans in other games over a recent period of time as potential offenders and allowing other games to see that flag.
I doubt this would be added in any official capacity. Not to mention that experiences have very different rules so tallying bans in this manner wouldn’t help very much unless ban reason or category is also included and it doesn’t seem like the API has any way of categorizing bans.
I would hope so that Roblox will be tracking that kind of stuff internally anyway for the site-wide moderation purposes.
This would be a bad idea for the exact same reason. Deleting or even just temporarily banning someone’s account for getting banned from experiences based on those experiences’ own rules wouldn’t make much sense, especially since plenty of things that would be perfectly reasonable to ban someone from a game for don’t violate TOS in any way.
Do banned users still trigger Players.PlayerAdded
? If not, is there some way to hook a banned player joining? Our game currently uses a MongoDB database to handle cross-game bans, which the Ban API sadly doesn’t allow for, so we are forced to keep the datastore but use the Ban API for the alt detection system. Changes are very often made to this datastore, but there’s no way to listen for said changes, so we need a way to check the players status on our datastore, then unban them if needed all before the error message displays.
This is awesome, but can we please edit “by the creator” part? So when moderators use this API it wont be confused by thinking the player got banned by only the “creator”, thank you!
just loop though the db and ban via the cloudapi
the problem is with unbanning, iterating through all bans on mongo and the roblox side would put a lot of ratelimit stress on the game afaik
On the ratelimit stress do you mean opencloud apis or httpservice
How is it possible to know that an account is an alt and you’re not just banning some innocent friend? Just curious
ive done some testing and the alt acc detection is not working for me
I think the idea behind this is to give developers context clues to determine if someone is indeed violating rules constantly. If I have a player that is accused of being malicious in game, and I am able to access historical data that indicates reports I am receiving are valid, this can be a very helpful tool.
I agree, it would be great if we could have another method to get the global ban history of a user and allow us to prematurely determine their risk factor or outright ban them before even trying to play. It would also be great to alert experience/game moderators of suspected players who have had a long history of repeated bans in a short time frame. PLEASE, make this into a reality, Roblox
thats pushing it I don’t think roblox would share that user info with any devs, not to mention this could be abused by people using alt accounts to ban.
Both of them as you would have to query the mongo and opencloud to iterate unbans like that.
Like if they are gonna leak the methods so people will be able to avoid them with ease
This is a great update!
I hope this can finally stop or slow botting and exploiters, keep making great updates!
Oh! I never knew mongodb had ratelimits might be if your using a atlas, just start transferring ur new bans to the BanAPI then export ur mongodb to json and loop through that json file and then ban via opencloud with respected api limits using x-ratelimit-remaining