mirror of
https://github.com/syuilo/ai.git
synced 2024-11-12 17:08:00 +00:00
✌️
This commit is contained in:
parent
6e0d5d9efb
commit
5ea387c070
14
src/ai.ts
14
src/ai.ts
|
@ -8,13 +8,13 @@ import * as chalk from 'chalk';
|
|||
import { v4 as uuid } from 'uuid';
|
||||
const delay = require('timeout-as-promise');
|
||||
|
||||
import config from './config';
|
||||
import Module from './module';
|
||||
import Message from './message';
|
||||
import Friend, { FriendDoc } from './friend';
|
||||
import { User } from './misskey/user';
|
||||
import Stream from './stream';
|
||||
import log from './utils/log';
|
||||
import config from '@/config';
|
||||
import Module from '@/module';
|
||||
import Message from '@/message';
|
||||
import Friend, { FriendDoc } from '@/friend';
|
||||
import { User } from '@/misskey/user';
|
||||
import Stream from '@/stream';
|
||||
import log from '@/utils/log';
|
||||
const pkg = require('../package.json');
|
||||
|
||||
type MentionHook = (msg: Message) => Promise<boolean | HandlerResult>;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import 藍 from './ai';
|
||||
import IModule from './module';
|
||||
import getDate from './utils/get-date';
|
||||
import { User } from './misskey/user';
|
||||
import { genItem } from './vocabulary';
|
||||
import 藍 from '@/ai';
|
||||
import IModule from '@/module';
|
||||
import getDate from '@/utils/get-date';
|
||||
import { User } from '@/misskey/user';
|
||||
import { genItem } from '@/vocabulary';
|
||||
|
||||
export type FriendDoc = {
|
||||
userId: string;
|
||||
|
|
|
@ -2,12 +2,12 @@ import autobind from 'autobind-decorator';
|
|||
import * as chalk from 'chalk';
|
||||
const delay = require('timeout-as-promise');
|
||||
|
||||
import 藍 from './ai';
|
||||
import Friend from './friend';
|
||||
import { User } from './misskey/user';
|
||||
import includes from './utils/includes';
|
||||
import or from './utils/or';
|
||||
import config from './config';
|
||||
import 藍 from '@/ai';
|
||||
import Friend from '@/friend';
|
||||
import { User } from '@/misskey/user';
|
||||
import includes from '@/utils/includes';
|
||||
import or from '@/utils/or';
|
||||
import config from '@/config';
|
||||
|
||||
export default class Message {
|
||||
private ai: 藍;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import 藍, { InstallerResult } from './ai';
|
||||
import 藍, { InstallerResult } from '@/ai';
|
||||
|
||||
export default abstract class Module {
|
||||
public abstract readonly name: string;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Module from '@/module';
|
||||
import Friend from '../../friend';
|
||||
import Friend from '@/friend';
|
||||
import serifs from '@/serifs';
|
||||
|
||||
function zeroPadding(num: number, length: number): string {
|
||||
|
|
|
@ -3,8 +3,8 @@ import Module from '@/module';
|
|||
import serifs from '@/serifs';
|
||||
import Message from '@/message';
|
||||
import { renderChart } from './render-chart';
|
||||
import { items } from '../../vocabulary';
|
||||
import config from '../../config';
|
||||
import { items } from '@/vocabulary';
|
||||
import config from '@/config';
|
||||
|
||||
export default class extends Module {
|
||||
public readonly name = 'chart';
|
||||
|
|
|
@ -2,7 +2,7 @@ import autobind from 'autobind-decorator';
|
|||
import Module from '@/module';
|
||||
import Message from '@/message';
|
||||
import serifs from '@/serifs';
|
||||
import { safeForInterpolate } from '../../utils/safe-for-interpolate';
|
||||
import { safeForInterpolate } from '@/utils/safe-for-interpolate';
|
||||
|
||||
const titles = ['さん', 'くん', '君', 'ちゃん', '様', '先生'];
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import { parse } from 'twemoji-parser';
|
||||
|
||||
import { Note } from '../../misskey/note';
|
||||
import { Note } from '@/misskey/note';
|
||||
import Module from '@/module';
|
||||
import Stream from '../../stream';
|
||||
import includes from '../../utils/includes';
|
||||
import Stream from '@/stream';
|
||||
import includes from '@/utils/includes';
|
||||
|
||||
export default class extends Module {
|
||||
public readonly name = 'emoji-react';
|
||||
|
|
|
@ -3,7 +3,7 @@ import Module from '@/module';
|
|||
import Message from '@/message';
|
||||
import serifs from '@/serifs';
|
||||
import * as seedrandom from 'seedrandom';
|
||||
import { genItem } from '../../vocabulary';
|
||||
import { genItem } from '@/vocabulary';
|
||||
|
||||
export const blessing = [
|
||||
'藍吉',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import * as loki from 'lokijs';
|
||||
import Module from '@/module';
|
||||
import config from '../../config';
|
||||
import config from '@/config';
|
||||
import serifs from '@/serifs';
|
||||
import { mecab } from './mecab';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Module from '@/module';
|
||||
import serifs from '@/serifs';
|
||||
import { genItem } from '../../vocabulary';
|
||||
import { genItem } from '@/vocabulary';
|
||||
|
||||
export default class extends Module {
|
||||
public readonly name = 'noting';
|
||||
|
|
|
@ -2,9 +2,9 @@ import autobind from 'autobind-decorator';
|
|||
import Message from '@/message';
|
||||
import Module from '@/module';
|
||||
import serifs from '@/serifs';
|
||||
import { genItem } from '../../vocabulary';
|
||||
import config from '../../config';
|
||||
import { Note } from '../../misskey/note';
|
||||
import { genItem } from '@/vocabulary';
|
||||
import config from '@/config';
|
||||
import { Note } from '@/misskey/note';
|
||||
|
||||
export default class extends Module {
|
||||
public readonly name = 'poll';
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
import * as request from 'request-promise-native';
|
||||
import Reversi, { Color } from 'misskey-reversi';
|
||||
import config from '../../config';
|
||||
import config from '@/config';
|
||||
import serifs from '@/serifs';
|
||||
import { User } from '../../misskey/user';
|
||||
import { User } from '@/misskey/user';
|
||||
|
||||
const db = {};
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ import * as childProcess from 'child_process';
|
|||
import autobind from 'autobind-decorator';
|
||||
import Module from '@/module';
|
||||
import serifs from '@/serifs';
|
||||
import config from '../../config';
|
||||
import config from '@/config';
|
||||
import Message from '@/message';
|
||||
import Friend from '../../friend';
|
||||
import getDate from '../../utils/get-date';
|
||||
import Friend from '@/friend';
|
||||
import getDate from '@/utils/get-date';
|
||||
|
||||
export default class extends Module {
|
||||
public readonly name = 'reversi';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Module from '@/module';
|
||||
import serifs from '@/serifs';
|
||||
import config from '../../config';
|
||||
import config from '@/config';
|
||||
|
||||
export default class extends Module {
|
||||
public readonly name = 'server';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import { HandlerResult } from '../../ai';
|
||||
import { HandlerResult } from '@/ai';
|
||||
import Module from '@/module';
|
||||
import Message from '@/message';
|
||||
import serifs, { getSerif } from '../../serifs';
|
||||
import getDate from '../../utils/get-date';
|
||||
import serifs, { getSerif } from '@/serifs';
|
||||
import getDate from '@/utils/get-date';
|
||||
|
||||
export default class extends Module {
|
||||
public readonly name = 'talk';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Module from '@/module';
|
||||
import Friend from '../../friend';
|
||||
import Friend from '@/friend';
|
||||
import serifs from '@/serifs';
|
||||
|
||||
export default class extends Module {
|
||||
|
|
|
@ -201,7 +201,7 @@ export default {
|
|||
/**
|
||||
* 接待のつもりが勝ってしまったとき
|
||||
*/
|
||||
iWonButSettai: name => `(${name}に接待で勝ってしまいました...)`,
|
||||
iWonButSettai: name => `(${name}に接待で勝っちゃいました...)`,
|
||||
|
||||
/**
|
||||
* 負けたとき
|
||||
|
|
Loading…
Reference in a new issue