mirror of
https://github.com/syuilo/ai.git
synced 2024-11-09 15:38:00 +00:00
Refactoring
This commit is contained in:
parent
6c69ee72b1
commit
29eae273e5
|
@ -7,7 +7,7 @@ function zeroPadding(num: number, length: number): string {
|
|||
return ('0000000000' + num).slice(-length);
|
||||
}
|
||||
|
||||
export default class BirthdayModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'birthday';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -9,7 +9,7 @@ const titles = ['さん', 'くん', '君', 'ちゃん', '様', '先生'];
|
|||
|
||||
const invalidChars = ['@', '#', '*', ':', '(', '[', ' ', ' '];
|
||||
|
||||
export default class CoreModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'core';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -3,7 +3,7 @@ import Module from '../../module';
|
|||
import Message from '../../message';
|
||||
import serifs from '../../serifs';
|
||||
|
||||
export default class DiceModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'dice';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -126,7 +126,7 @@ const faces = [
|
|||
'👽'
|
||||
]
|
||||
|
||||
export default class EmojiModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'emoji';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -2,7 +2,7 @@ import autobind from 'autobind-decorator';
|
|||
import Module from '../../module';
|
||||
import Message from '../../message';
|
||||
|
||||
export default class FollowModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'follow';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -5,7 +5,7 @@ import serifs from '../../serifs';
|
|||
import * as seedrandom from 'seedrandom';
|
||||
import { blessing, itemPrefixes, items } from './vocabulary';
|
||||
|
||||
export default class FortuneModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'fortune';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -5,7 +5,7 @@ import Message from '../../message';
|
|||
import serifs from '../../serifs';
|
||||
import getCollection from '../../utils/get-collection';
|
||||
|
||||
export default class GuessingGameModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'guessingGame';
|
||||
|
||||
private guesses: loki.Collection<{
|
||||
|
|
|
@ -13,7 +13,7 @@ function kanaToHira(str: string) {
|
|||
});
|
||||
}
|
||||
|
||||
export default class KeywordModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'keyword';
|
||||
|
||||
private tokenizer: any;
|
||||
|
|
|
@ -2,7 +2,7 @@ import autobind from 'autobind-decorator';
|
|||
import Module from '../../module';
|
||||
import Message from '../../message';
|
||||
|
||||
export default class PingModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'ping';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -7,7 +7,7 @@ import Message from '../../message';
|
|||
import Friend from '../../friend';
|
||||
import getDate from '../../utils/get-date';
|
||||
|
||||
export default class ReversiModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'reversi';
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,7 @@ import Module from '../../module';
|
|||
import serifs from '../../serifs';
|
||||
import config from '../../config';
|
||||
|
||||
export default class ServerModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'server';
|
||||
|
||||
private connection?: any;
|
||||
|
|
|
@ -3,7 +3,7 @@ import Module from '../../module';
|
|||
import Message from '../../message';
|
||||
import serifs from '../../serifs';
|
||||
|
||||
export default class TimerModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'timer';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -3,7 +3,7 @@ import Module from '../../module';
|
|||
import Friend from '../../friend';
|
||||
import serifs from '../../serifs';
|
||||
|
||||
export default class ValentineModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'valentine';
|
||||
|
||||
@autobind
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import autobind from 'autobind-decorator';
|
||||
import Module from '../../module';
|
||||
|
||||
export default class WelcomeModule extends Module {
|
||||
export default class extends Module {
|
||||
public readonly name = 'welcome';
|
||||
|
||||
@autobind
|
||||
|
|
Loading…
Reference in a new issue