senses:types:bot-context
Table of Contents
bot context
The bot context table type serves as the base type for any of the global bot contexts (satori & koishi).
getAuthToken
The getAuthToken field contains a function that allows you to get the current auth info table for this bot.
Syntax
getAuthToken(): (auth: table)
Arguments
This function takes no arguments.
Returns
- The first return value will be an auth type table containing the auth info for this bot.
getMaxMessageLength
The getMaxMessageLength field contains a function that returns the maximum number of characters a message may contain.
This value will only be initialised once the bot has connected to the server, before that it is set to the same value as math.maxinteger
.
Syntax
getMaxMessageLength(): (length: integer)
Arguments
This function takes no arguments.
Returns
- The first return value will contain the maximum length a message body is allowed to be.
sendMessage
The sendMessage field contains a function that send a message on behalf of the bot.
Syntax
sendMessage(text: string): ()
Arguments
- The first argument should contain a non-empty string. If an empty string is provided, it will be ignored.
Returns
This function does not return any values.
senses/types/bot-context.txt · Last modified: by flash