Aggiunto supporto per i nuovi utenti

This commit is contained in:
KillerBossOriginal 2024-07-03 16:38:33 +02:00
parent efbf2e4084
commit 33b50bca4e

23
src/types/IAUser.ts Normal file
View file

@ -0,0 +1,23 @@
import { IALanguage } from "./IALanguage"
export class IAUser {
id: string;
username: string;
permission: string[];
credits: number;
language: IALanguage;
constructor(options: { id: string, username: string, permissions: string[], credits: number, language: string }) {
this.id = options.id;
this.username = options.username;
this.permission = options.permissions;
this.credits = options.credits;
switch (options.language) {
case "en":
this.language = IALanguage.EN;
break;
default:
this.language = IALanguage.EN;
}
}
}