Giter Site home page Giter Site logo

ragujp / oishii-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kabo2468/oishii-bot

0.0 0.0 0.0 972 KB

美食家 おいしいBotのリポジトリ

Home Page: https://misskey.io/@oishiibot

License: MIT License

JavaScript 0.68% TypeScript 99.32%

oishii-bot's Introduction

oishii-bot

なにこれ

Misskey で動く日本語Botです。

TLから言葉を学び、それをおいしいかまずいか決めて、投稿するBotです。

使い方

Misskey で @oishiibot を作る

この ID じゃないと動きません

Node.js, npm, PostgreSQL をインストールする

Node.js のバージョンは v16 以上にしてください

OS によってインストール方法が異なるので、各自調べてください

MeCab をインストールする

aptなどのパッケージインストーラーからインストールするか、自分でビルドしてください

example.json5 をコピーして config.json5 を作る

cp example.json5 config.json5

config.json5下にあるように編集する

vi config.json5
# OR
emacs config.json5
# OR
nano config.json5
# ...etc

ビルドする

npm i
npm run build

Table を作る

npm run migration

終わり

npm start

config.json5

{
    // MisskeyのURL
    url: 'https://misskey.io',
    // 多分アクセストークンでも行ける(未検証)
    // アクセストークンでやる場合は、すべての権限をオンにしたほうが楽かも
    apiKey: '',
    // 大文字のところを書き換える
    databaseUrl: 'postgresql://USER:PASSWORD@HOST:PORT/DATABASE',
    // DBのSSL
    dbSSL: false,
    // オーナーのUsername オーナーのみが使えるコマンドを使う人を配列で指定する
    ownerUsernames: ['kabo'],
    post: {
        // 何分毎に投稿するか
        autoPostInterval: 60,
        // TLに(フォロー / 3)数流れてきたときに食べ物を言う確率
        tlPostProbability: 0.4,
        // レートリミットの解除秒数
        rateLimitSec: 60,
        // レートリミットの最大数
        rateLimitPost: 5,
    },
    mecab: {
        // mecabのインストールパス (`which mecab`)
        binPath: '/usr/bin/mecab',
        // mecabの辞書ファイル
        dicPath: '',
    },
}

NG Words

Xeltica さんの Citrine から参考にさせていただきました。

https://github.com/Xeltica/Citrine/blob/master/Resources/ngwords.txt

oishii-bot's People

Contributors

kabo2468 avatar nenohi avatar sanmurakami avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.