mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Add types for Moderator commands (#5084)
* Add types for Moderator commands * Support User Priv Level & userLevel
This commit is contained in:
parent
9f515fc804
commit
c5bb38e907
10 changed files with 51 additions and 34 deletions
|
|
@ -1,30 +1,30 @@
|
|||
import { ServerDispatch } from 'store';
|
||||
import { Log } from 'types';
|
||||
import { BanHistoryItem, LogItem, WarnHistoryItem, WarnListItem } from 'types';
|
||||
|
||||
import NormalizeService from '../utils/NormalizeService';
|
||||
|
||||
export class ModeratorPersistence {
|
||||
static banFromServer(userName: any) {
|
||||
static banFromServer(userName: string): void {
|
||||
console.log(userName);
|
||||
}
|
||||
|
||||
static banHistory(banHistory: any) {
|
||||
console.log(banHistory);
|
||||
static banHistory(userName: string, banHistory: BanHistoryItem[]): void {
|
||||
console.log(userName, banHistory);
|
||||
}
|
||||
|
||||
static viewLogs(logs: Log[]) {
|
||||
static viewLogs(logs: LogItem[]): void {
|
||||
ServerDispatch.viewLogs(NormalizeService.normalizeLogs(logs));
|
||||
}
|
||||
|
||||
static warnHistory(warnList: any) {
|
||||
static warnHistory(userName: string, warnHistory: WarnHistoryItem[]): void {
|
||||
console.log(userName, warnHistory);
|
||||
}
|
||||
|
||||
static warnList(warnList: WarnListItem[]): void {
|
||||
console.log(warnList);
|
||||
}
|
||||
|
||||
static warnList(warning: any) {
|
||||
console.log(warning);
|
||||
}
|
||||
|
||||
static warnUser(userName: any) {
|
||||
static warnUser(userName: string): void {
|
||||
console.log(userName);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue