mirror of
https://github.com/syuilo/ai.git
synced 2024-11-21 20:58:00 +00:00
Page Eventでのリバーシ招待対応
This commit is contained in:
parent
ec4f35185d
commit
2f7a409a72
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue