Installation command
!!MCDR plugin install hitokoto
Author
Repository
Homepage
Synced at
...
Last update
...
Latest version
Total downloads
6
Back to catalogue
MCDR Hitokoto
Call the Hitokoto API and automatically output the result to the server.
Configuration File
{
"interval": "10s",
"parameters": {},
"base_url": "https://v1.hitokoto.cn/",
"from_where": true
}
interval
: Fetch interval. Supported units:s
,m
,h
. Minimum value is10s
.base_url
: API endpoint URL.parameters
: API request parameters. Refer to #接口说明(Interface Documentation) .from_where
: Whether to display the source of the sentence.
Example Configuration File:
{
"interval": "1m",
"parameters": {
"c": ["a", "c"],
"max_length": 10
},
"base_url": "https://v1.hitokoto.cn/",
"from_where": true
}
API 调用
The plugin provides a get_hitokoto()
function to call the API.
Usage Example:
import hitokoto
message = hitokoto.get_hitokoto()
print(message)
Introduction source: hitokoto/doc/README.md