Skip to content

A simple plugin for koishi that provides a command hitokoto to get a random hitokoto sentence, which is from https://hitokoto.cn.

License

Notifications You must be signed in to change notification settings

AwesomeHamster/koishi-plugin-hitokoto

Repository files navigation

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.

About

A simple plugin for koishi that provides a command hitokoto to get a random hitokoto sentence, which is from https://hitokoto.cn.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published