Introduction
TODO: Still needs to be written.
A Rust Matrix bot.
User Agent
The bot consistently uses the following user agent template:
fuuka-bot/<version> (https://github.com/ShadowRZ/fuuka-bot)
Where <version> is the running version of the bot.
Configuration
The following content should be edited and saved to fuuka-bot.toml as you want.
# Admin user. (Optional)
admin-user = "@example:example.org"
[command]
# The command prefix.
prefix = "%%"
[matrix]
# Homeserver URL.
homeserver = "https://matrix.example.com"
# Service URLs.
[services]
# Hitokoto API.
hitokoto = "https://v1.hitokoto.cn"
[pixiv]
enabled = false
r18 = false
token = "????????_XXXXXXXXXXXXXXXXXXXX"
[[pixiv.traps]]
rooms = ["!XXXXXXXXXXX:example.org"]
required-tags = []
target = ""
[[pixiv.traps]]
required-tags = []
target = ""
[[features]]
room = ""
jerryxiao = true
fortune = false
pixiv = false
pixiv-r18 = false
[stickers]
send-to = "!XXXXXXXXXXX:example.org"
[nixpkgs-pr]
token = ""
Logging in
Run the bot, the bot should auto ask your credentials, note that It is required for the homeserver to enable user/password login!
Commands
TODO: Still needs to be written.
WARN: May not reflect the current configuration.
help
Sends the help message link and source code repo.
profile avatar history
Get the target user's avatar change history.
Requires replying to a message.
profile name history
Get the target user's name change history.
Requires replying to a message.
crazy_thursday
On Thrusday, print "Crazy Thursday !!". Otherwise print remaining time to next Thursday.
room_id
Print the Matrix Room ID.
user_id
Print the Matrix user ID of the replied user, or the sender.
ping
Ping the bot, print the time elpased to receive the message.
ping-admin
Ping the admin user for convenience of bridged users.
Requires a defined admin user.
profile avatar
In a reply, send the avatar of the person being replied to.
Outside of a reply, send the avatar of the command sender.
remind
Remind the command sender of the reply target event's sender when next message from that one is received by the bot.
Requires replying to a message.
divergence
For fun, print the make-up divergence measurement.
hitokoto
Sends a quote from https://hitokoto.cn
pixiv [illust_id]
Without argument, print the first five items of the Pixiv daily ranking.
With argument illust_id, print the info of the illust.
ignore
Ask the bot to hard ignore a user.
Requires replying to a message.
Requires a defined admin user.
unignore <user_id>
Ask the bot to unignore a user.
Requires replying to a message.
Requires a defined admin user.
@Nahida
TODO: Still needs to be written.
Other unwritten URLs just print a generic page title.
@Nahida https://crates.io/[...]
Prints a crate's info.
@Nahida https://pixiv.net/[...]
Prints a illust's info on Pixiv.