koishi-plugin-hitokoto
TypeScript icon, indicating that this package has built-in type declarations

2.1.7 • Public • Published

koishi-plugin-hitokoto

「用代码表达言语的魅力,用代码书写山河的壮丽。」

Programming for the charm of words, coding to draw the magnificent scenery.

by Hitokoto Developers


npm

🌏 English | 简体中文

A koishi plugin to get a random "Hitokoto" Chinese sentence, which is from 一言网.

How to Install

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

Configuration

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'].

Internationalisation

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.

Changelog

The changelog of this plugin can be found here.

License

This project is licensed under the MIT license, and the use of data from 一言网 is in non-commercial purposes.

Package Sidebar

Install

npm i koishi-plugin-hitokoto

Weekly Downloads

30

Version

2.1.7

License

MIT

Unpacked Size

18.3 kB

Total Files

6

Last publish

Collaborators

  • maiko_tan
  • saarchaffee