The bot will create a new data in FireBase with the ban informations for example: The player ID, the moderator and the reason why they got banned. When a banned player joins the game the script that I provided above will kick them and state why they got kicked and who banned them.
I still don’t know what you trying to expain but very much there is a reason why I am using noblox API
If you want me to explain you in detail how my bot works I would love to
Could you point that out in the code itself starting from setting up the place ID?
I went through the code again and there’s no mention of Place or game ID in index.js nor in your env file and only Auth it’s calling for is fire base related…
The code what you seeing is the code that handles the bot only. It doesn’t kick or ban the player since I think that’s impossible? I provided a RBXM file that contains 2 scripts, a script and a firebase API by @MXKhronos.
Basically what it does is, everytime a new player joins the game, the script will tell the API to check if the player user Id is found in the database. If the player had a data then it kicks them from the game.
The 3rd party site aspect of this would be daunting to set up in my personal opinion, and can be avoided completely, in other words this can also be done using a simple webhook and Messaging Service. Along with storing bans you can use a datastore to store any bans given from users.
IE:
local commands = game:GetService("MessagingService")
function(user, mod, context)
commands:PublishAsync("banusers",user,context)
local bambi = {
["username"] = ("User Was Banned"),
["content"] = ("User**"..name.."** was **banned** by **"..moduser.."** **"..(context).."**."),
}
bambi= http:JSONEncode(bambi)
http:PostAsync("Discord Webhook", bambi)
(Of course with more detail you’d have a full logging and ban system via Roblox To Discord)
In the part where it says that anyone with the database reference can view, edit, and deleted data in 30 days. After those 30 days are over, I think it’ll default to block all requests to the database until the end user writes rules for it. The reason why I know is because I did this before for a Discord bot and it said in an email that all requests after 30 days will be blocked, so unless they changed this, it’ll be this case.
Side note: I have many plans for Pegasus so I would like to announce some of the plans that I would like everyone to know.
I am planning to transform Pegasus into a closed-source public bot, whoever I am still gonna keep the V1 of the bot open-sourced and still offer support for it. I will also include many more commands such as verification, group functions like exile, promote, set rank, demote, accept joins requests, and shouts.
Whoever, due to school started this might take time. Anyways, I am always open to suggestions and I would love to offer support to anyone.
I would like to know how to make a getban command for the Discord bot, what I want it to do is when someone types !getban [PlayerName] it will return with the Ban Reason. Your help would be appreciated.
I wouldn’t make the verification code some long randomized non-legible text. I’d make it a few uncommonly used words in the English language so that it’s quick and easy for anyone to verify