bans.remove
Removes a ban, so the address can connect again.
Signature
Section titled “Signature”bans.remove(id: string): Promise<ActionResult>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
id |
string |
The ban’s ID, from bans.list(). |
Returns
Section titled “Returns”A promise of an ActionResult: applied once the change is saved. An empty or too long ID is invalid-ban-id, an ID that is not banned ban-not-found, and a bans file that could not be written ban-save-failed.
Example
Section titled “Example”import { bans, chat, commands } from "nativemp";
commands.register("unban", async (player, args) => { const result = await bans.remove(args.trim()); chat.sendServerMessage(result.status === "applied" ? "Unbanned." : "No such ban.", player);});Related
Section titled “Related”bans.list: find the ID