Dota 2 Workshop Tools/Community/IRC/lebot
Overview
Lebot is RoyAwesome's API bot. It was responsible for maintaining the API page.
Access to modifying the API info is restricted to certain users. Ask RoyAwesome for permission to modify API content.
Lebot can be accessed on
irc.gamesurge.net
#dota2modding
#dota2api
Usage
Lebot has 3 public functions, all preceded by a .
.function
.function
searches through the api function database. .f
is also an alias of this command.
Usage:
.function
Reports back a help text
.function find [text]
Searches the API for any function that contains [text] and reports back the function name and API link
.function [functionName] <Modify|View> [Property] [optional: Data]
Looks up functionName's Property. Properties are Class, FunctionDescription, ReturnType, ReturnDescription, Example
.function add <rawhastebinLink>
Adds a functionto the Database. The 2nd parameter must be a 'just text' link of a json blob hosted on hastebin.com.
Example function definition:
{
"Params": [
{
"Name": "groupSpawnTables",
"Type": "handle",
"Description": "No Description Set"
},
{
"Name": "bAsync",
"Type": "bool",
"Description": "true if running asynchronously"
},
{
"Name": "hCallback",
"Type": "handle",
"Description": "No Description Set"
}
],
"FunctionName": "SpawnEntityGroupFromTable",
"Class": "Global",
"FunctionDescription": "Hierarchically spawn an entity group from a set of spawn tables.",
"ReturnType": "bool",
"ReturnDescription": "No Description Set",
"Example": "--some code here",
"LastUpdate": "2014-08-08T23:31:26.8743406-07:00"
}
.function <replace> oldFuncName hastebinblob
replaces oldFuncName with a json blob at the hastebin link. See add
for the format
.class
.class
searches through the api function database.
Usage:
.class
Reports back a help text
.class find [text]
Searches the API for any class that contains [text] and reports back the class name.
.class [className] <Modify|View> [Property] [optional: Data]
Looks up className's Property. Properties are Description, Accessor, BaseClass
.class add <rawhastebinLink>
Adds a class to the Database. The 2nd parameter must be a 'just text' link of a json blob hosted on hastebin.com.
Example class:
{
"ClassName": "Global",
"Description": "Global functions. These can be called without any class",
"Accessor": "",
"BaseClass": ""
}
.param
.param
modifies or views a parameter as part of a function.
Usage:
.param
Reports back a help text
.paramlist [functionName]
Displays the parameters for functionName
.param[functionName] [paramID] <Modify|View> [Property] [optional: Data]
Looks up the parameter paramID
in functionName
. ParamIDs start indexing at 0.
Properties are Name, Type, Description