Class DefaultAbilities
Object
DefaultAbilities
- All Implemented Interfaces:
AbilityExtension
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackupDB()This backup ability returns the object defined byDBContext.backup()as a message document.banUser()Banned users are accumulated in the blacklist.Regular users and admins who try to claim the bot will get banned.commands()Default format:Recovers the bot database usingDBContext.recover(Object).Format of the report:Usage:/unban @username
-
Field Details
-
CLAIM
- See Also:
-
BAN
- See Also:
-
PROMOTE
- See Also:
-
DEMOTE
- See Also:
-
UNBAN
- See Also:
-
BACKUP
- See Also:
-
RECOVER
- See Also:
-
COMMANDS
- See Also:
-
REPORT
- See Also:
-
STATS
- See Also:
-
-
Constructor Details
-
DefaultAbilities
-
-
Method Details
-
reportCommands
Format of the report:
[command1] - [description1]
[command2] - [description2]
...
Once you invoke it, the bot will send the available commands to the chat. This is a public ability so anyone can invoke it.
Usage:
/commands- Returns:
- the ability to report commands defined by the child bot.
-
commands
Default format:PUBLIC
[command1] - [description1]
[command2] - [description2]
GROUP_ADMIN
[command1] - [description1]
...
- Returns:
- the ability to print commands based on the privacy of the requesting user
-
reportStats
- Returns:
- the ability to report statistics for abilities and replies.
-
backupDB
This backup ability returns the object defined byDBContext.backup()as a message document.This is a high-profile ability and is restricted to the CREATOR only.
Usage:
/backup- Returns:
- the ability to back-up the database of the bot
-
recoverDB
Recovers the bot database usingDBContext.recover(Object).The bot recovery process hugely depends on the implementation of the recovery method of
DBContext.Usage:
/recover- Returns:
- the ability to recover the database of the bot
-
banUser
Banned users are accumulated in the blacklist. UseDBContext.getSet(String)with name specified byBaseAbilityBot.BLACKLIST.Usage:
/ban @usernameNote that admins who try to ban the creator, get banned.
- Returns:
- the ability to ban the user from any kind of bot interaction
-
unbanUser
Usage:/unban @username- Returns:
- the ability to unban a user
-
promoteAdmin
- Returns:
- the ability to promote a user to a bot admin
-
demoteAdmin
- Returns:
- the ability to demote an admin to a user
-
claimCreator
Regular users and admins who try to claim the bot will get banned.- Returns:
- the ability to claim yourself as the master and creator of the bot
-