ユーザーの全プロパティを保存するのは無駄なので必要なプロパティのみ保存するように

This commit is contained in:
syuilo 2019-01-24 09:45:35 +09:00
parent be8583548a
commit 82588a602a
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -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
});