@ariusii/intersect.ts
Version:
The Intersect Engine API Client Library based on TS.
133 lines • 5.92 kB
TypeScript
/**
* This is the Admin Class, it contains all the admin actions from the API.
* Some of these actions require the Users.Query role.
* @class Admin
* @link https://docs.freemmorpgmaker.com/en-US/api/v1/endpoints/admin.html
* @author AriusII
*/
export declare class Admin {
private _url;
private _token;
constructor(_url: string, _token: string);
/**
* It bans a player from the server
* @param {string} player - The player's name.
* @param {number} duration - The duration of the ban in seconds.
* @param {string} reason - The reason for the ban.
* @param {string} moderator - The name of the moderator who banned the player.
* @param {boolean} ip - boolean - (Optional) Whether or not to ban the player's IP address.
* @returns The response from the server.
*/
banPlayer(player: string, duration: number, reason: string, moderator: string, ip: boolean): Promise<any>;
/**
* It bans a user from the server
* @param {string} user - The user's name.
* @param {number} duration - The duration of the ban in seconds.
* @param {string} reason - The reason for the ban.
* @param {string} moderator - The moderator who banned the user.
* @param {boolean} ip - boolean - (Optional) Whether or not to ban the user's IP address.
* @returns The response from the server.
*/
banUser(user: string, duration: number, reason: string, moderator: string, ip: boolean): Promise<any>;
/**
* It unban's a user
* @param {string} user - The user's name.
* @returns The response from the server.
*/
unbanUser(user: string): Promise<any>;
/**
* It unban's a player
* @param {string} player - The player's name.
* @returns The response from the server.
*/
unbanPlayer(player: string): Promise<any>;
/**
* It kicks a user from the server
* @param {string} user - The user's name.
* @returns The response from the server.
*/
kickUser(user: string): Promise<any>;
/**
* It kicks a player from the server
* @param {string} player - The player's name.
* @returns The response from the server.
*/
kickPlayer(player: string): Promise<any>;
/**
* It mutes a user
* @param {string} user - The user's name.
* @param {number} duration - The duration of the mute in seconds.
* @param {string} reason - The reason for the mute.
* @param {string} moderator - The moderator who is muting the user.
* @param {boolean} ip - boolean - (Optional) Whether or not to mute the user's IP address.
* @returns The response from the server.
*/
muteUser(user: string, duration: number, reason: string, moderator: string, ip: boolean): Promise<any>;
/**
* It mutes a player
* @param {string} player - The player's name.
* @param {number} duration - The duration of the mute in seconds.
* @param {string} reason - The reason for the mute.
* @param {string} moderator - The name of the moderator who is muting the player.
* @param {boolean} ip - boolean - (Optional) Whether or not to mute the player's IP address.
* @returns The response from the server.
*/
mutePlayer(player: string, duration: number, reason: string, moderator: string, ip: boolean): Promise<any>;
/**
* It unmutes a user
* @param {string} user - The user's name.
* @returns The response from the server.
*/
unmuteUser(user: string): Promise<any>;
/**
* It unmutes a player
* @param {string} player - The player's name.
* @returns The response from the server.
*/
unmutePlayer(player: string): Promise<any>;
/**
* It warps a player user to a map location
* @param {string} player - The player's name.
* @param {string} mapid - The ID of the map you want to warp to.
* @returns The response from the server.
*/
playerWarpTo(player: string, mapid: string): Promise<any>;
/**
* It warps a user to a map location
* @param {string} user - The user's name.
* @param {string} mapid - The map ID of the map you want to warp to.
* @returns The response from the server.
*/
userWarpTo(user: string, mapid: string): Promise<any>;
/**
* It warps a user to a location on a map
* @param {string} user - The user's name you want to warp.
* @param {string} mapid - The map ID of the map you want to warp to.
* @param {number} x - The x coordinate of the location you want to warp to.
* @param {number} y - The y coordinate of the location you want to warp to.
* @returns The response from the server.
*/
userWarpToLoc(user: string, mapid: string, x: number, y: number): Promise<any>;
/**
* It sends a POST request to the server with the player's ID, the map ID, and the X and Y coordinates
* @param {string} player - The player's name you want to warp.
* @param {string} mapid - The ID of the map you want to warp to.
* @param {number} x - The x coordinate of the location you want to warp to.
* @param {number} y - The y coordinate of the location you want to warp to.
* @returns The response from the server.
*/
playerWarpToLoc(player: string, mapid: string, x: number, y: number): Promise<any>;
/**
* It kill a player by their ID
* @param {string} user - The users's name you want to kill.
* @returns The response from the server.
*/
killUser(user: string): Promise<any>;
/**
* It kills a player by their name
* @param {string} player - The player's name you want to kill.
* @returns The response from the server.
*/
killPlayer(player: string): Promise<any>;
}
//# sourceMappingURL=admin.d.ts.map