「用代码表达言语的魅力,用代码书写山河的壮丽。」
Programming for the charm of words, coding to draw the magnificent scenery.
by Hitokoto Developers
🌏 English | 简体中文
A koishi plugin to get a random "Hitokoto" Chinese sentence, which is from 一言网.
You could install plugins in Koishi with Koishi Plugin Market by searching the name hitokoto
.
Or you could install this plugin manually with yarn
or npm
as well:
$ yarn add koishi-plugin-hitokoto
# Or with `npm`
$ npm install --save koishi-plugin-hitokoto
You can configure this plugin using the following configurations.
Name | Type | Required | Default | Description |
---|---|---|---|---|
apiUrl |
string |
no | https://api.hitokoto.cn/ |
The API URL of the service. |
minLength |
number |
no | 0 | The minimum length of the sentence, can be override via options. |
maxLength |
number |
no | 30 | The maximum length of the sentence, can be override via options. |
defaultTypes |
Array<string> |
no | all types | The default types of the sentence, can be override via options. If an empty array was passed in, then the plugin would treat it as ['a'] . |
This plugin supports multiple languages and we are using Crowdin to localise our project.
If you are willing to contribute your language, please register a Crowdin account before contributing translations to the hitokoto
folder of the Crowdin project hatsushimo.
The changelog of this plugin can be found here.
This project is licensed under the MIT license, and the use of data from 一言网 is in non-commercial purposes.