PropertiesUa extends Base
Table of Contents
Constants
Methods
- addError() : void
- getBotId() : int
- Returns registered bot Id.
- getError() : Error
- getLangMessage() : mixed
- hasError() : bool
- Tells true if error has occurred.
- isEnabled() : bool
- Is bot enabled.
- onAnswerAdd() : array<string|int, mixed>
- Event handler on answer add.
- onBotDelete() : bool
- Event handler on bot remove.
- onChatStart() : bool
- Event handler when bot join to chat.
- onCommandAdd() : bool
- Event handler on command add.
- onCommandLang() : bool|array<string|int, mixed>
- Returns title and description for app or command list.
- onMessageAdd() : bool
- Event handler on message add.
- register() : int
- Register bot at portal.
- sendAnswer() : mixed
- setBotId() : bool
- Saves new Id of the registered bot.
- unRegister() : bool
- Unregister bot at portal.
- uploadAvatar() : array<string|int, mixed>|bool|string
- uploadIcon() : bool|int
Constants
BOT_CODE
public
mixed
BOT_CODE
= "propertiesua"
FO
public
mixed
FO
= "FO"
MODULE_ID
public
mixed
MODULE_ID
= "imbot"
UO
public
mixed
UO
= "UO"
Methods
addError()
public
static addError(Error $error) : void
Parameters
- $error : Error
getBotId()
Returns registered bot Id.
public
static getBotId() : int
Return values
intgetError()
public
static getError() : Error
Return values
ErrorgetLangMessage()
public
static getLangMessage([mixed $messageCode = '' ]) : mixed
Parameters
- $messageCode : mixed = ''
hasError()
Tells true if error has occurred.
public
static hasError() : bool
Return values
boolisEnabled()
Is bot enabled.
public
static isEnabled() : bool
Return values
boolonAnswerAdd()
Event handler on answer add.
public
static onAnswerAdd(mixed $command, mixed $params) : array<string|int, mixed>
Parameters
- $command : mixed
- $params : mixed
Return values
array<string|int, mixed>onBotDelete()
Event handler on bot remove.
public
static onBotDelete([int|null $bodId = null ]) : bool
Parameters
- $bodId : int|null = null
Return values
boolonChatStart()
Event handler when bot join to chat.
public
static onChatStart(mixed $dialogId, mixed $joinFields) : bool
Parameters
- $dialogId : mixed
- $joinFields : mixed
Return values
boolonCommandAdd()
Event handler on command add.
public
static onCommandAdd(int $messageId, array<string|int, mixed> $messageFields) : bool
Parameters
- $messageId : int
- $messageFields : array<string|int, mixed>
Return values
boolonCommandLang()
Returns title and description for app or command list.
public
static onCommandLang(string $command[, string $lang = null ]) : bool|array<string|int, mixed>
Parameters
- $command : string
-
App or command code.
- $lang : string = null
-
Language Id.
Return values
bool|array<string|int, mixed>onMessageAdd()
Event handler on message add.
public
static onMessageAdd(mixed $messageId, mixed $messageFields) : bool
Parameters
- $messageId : mixed
- $messageFields : mixed
Return values
boolregister()
Register bot at portal.
public
static register([array<string|int, mixed> $params = array() ]) : int
Parameters
- $params : array<string|int, mixed> = array()
Return values
intsendAnswer()
public
static sendAnswer(mixed $messageId, mixed $messageFields) : mixed
Parameters
- $messageId : mixed
- $messageFields : mixed
setBotId()
Saves new Id of the registered bot.
public
static setBotId(int $id) : bool
Parameters
- $id : int
Return values
boolunRegister()
Unregister bot at portal.
public
static unRegister() : bool
Return values
booluploadAvatar()
public
static uploadAvatar([string $lang = LANGUAGE_ID ]) : array<string|int, mixed>|bool|string
Parameters
- $lang : string = LANGUAGE_ID
Return values
array<string|int, mixed>|bool|stringuploadIcon()
public
static uploadIcon(mixed $iconName) : bool|int
Parameters
- $iconName : mixed