🎊exports

Use these exports to integrate sl-bot with other scripts.


Helper Functions

getLicense

Get player's license identifier.

local license = exports['sl-bot']:getLicense(source)

getDiscord

Get player's Discord identifier.

local discord = exports['sl-bot']:getDiscord(source)
-- Returns: "discord:123456789012345678" or nil

getSteam

Get player's Steam identifier.

local steam = exports['sl-bot']:getSteam(source)
-- Returns: "steam:110000123456789" or nil

getIdentifier

Get player's primary identifier (license).


isPlayerOnline

Check if a player is online.


getPlayerNameSafe

Get player name safely.


Ban System

banPlayer

Ban a player programmatically.

Parameter
Type
Description

target

string/number

Player ID or license

duration

string

Duration (e.g., '7d', '1M')

reason

string

Ban reason

admin

string

Admin name (optional, default: 'System')

Returns: { success = true/false, message = "..." }

Example:


unbanPlayer

Unban a player.

Parameter
Type
Description

target

string

Ban ID or license

admin

string

Admin name (optional)

Example:


checkBan

Check if a player has an active ban.

Example:


getBansList

Get list of all active bans.


Warning System

warnPlayer

Warn a player.

Parameter
Type
Description

playerId

number

Online player ID

reason

string

Warning reason

admin

string

Admin name (optional)

Example:


getPlayerWarnings

Get player's warnings.

Parameter
Type
Description

target

string/number

Player ID or license

Example:


removeWarning

Remove a specific warning.

Example:


clearPlayerWarnings

Clear all warnings for a player.

Example:


Player Management

kickPlayer

Kick a player from the server.

Example:


kickAllPlayers

Kick all players from the server.

Example:


getOnlinePlayers

Get list of online players.


Execute Command

execute

Execute any bot command programmatically.

Parameter
Type
Description

command

string

Command name (without prefix)

args

table

Command arguments

admin

string

Admin name

Examples:


Usage Examples

Anti-Cheat Integration

Warning System Integration

Ban Check on Player Action