diff --git a/src/modules/reversi/index.ts b/src/modules/reversi/index.ts index 5b0d62a..6314ec1 100644 --- a/src/modules/reversi/index.ts +++ b/src/modules/reversi/index.ts @@ -27,6 +27,17 @@ export default class extends Module { // マッチしたとき this.reversiConnection.on('matched', msg => this.onReversiGameStart(msg)); + if (config.reversiEnabled) { + const mainStream = this.ai.connection.useSharedConnection('main'); + mainStream.on('pageEvent', msg => { + if (msg.event === 'inviteReversi') { + this.ai.api('games/reversi/match', { + userId: msg.user.id + }); + } + }); + } + return { mentionHook: this.mentionHook };