hitokoto

调用一言api

API
工具

一键安装指令

!!MCDR plugin install hitokoto

作者

数据同步于

...

上次更新

...

最新版本

总下载量

49

返回插件仓库

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 is 10s.
  • 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)

自述文件来源:README.md