mirror of
https://github.com/syuilo/ai.git
synced 2024-11-24 22:01:07 +00:00
ユーザーの全プロパティを保存するのは無駄なので必要なプロパティのみ保存するように
This commit is contained in:
parent
be8583548a
commit
82588a602a
|
@ -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
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue