From 82588a602a724727e4f92a80d3d095fb754e7827 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 24 Jan 2019 09:45:35 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=AE?= =?UTF-8?q?=E5=85=A8=E3=83=97=E3=83=AD=E3=83=91=E3=83=86=E3=82=A3=E3=82=92?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E3=81=99=E3=82=8B=E3=81=AE=E3=81=AF=E7=84=A1?= =?UTF-8?q?=E9=A7=84=E3=81=AA=E3=81=AE=E3=81=A7=E5=BF=85=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=91=E3=83=86=E3=82=A3=E3=81=AE=E3=81=BF?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/kazutori/index.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/modules/kazutori/index.ts b/src/modules/kazutori/index.ts index 322db9b..4109b04 100644 --- a/src/modules/kazutori/index.ts +++ b/src/modules/kazutori/index.ts @@ -3,7 +3,12 @@ import * as loki from 'lokijs'; import Module from '../../module'; import Message from '../../message'; import serifs from '../../serifs'; -import { User } from '../../misskey/user'; + +type User = { + id: string; + username: string; + host: string; +}; type Game = { votes: { @@ -97,8 +102,13 @@ export default class extends Module { this.log(`Voted ${num} by ${msg.user.id}`); + // 投票 game.votes.push({ - user: msg.user, + user: { + id: msg.user.id, + username: msg.user.username, + host: msg.user.host + }, number: num });