* Add Types

* Add Types
This commit is contained in:
Zach H 2024-06-17 00:32:36 -04:00 committed by GitHub
parent 0994d10410
commit c4bf9eb61c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 207 additions and 737 deletions

View file

@ -6,10 +6,7 @@ export function banFromServer(minutes: number, userName?: string, address?: stri
const command = webClient.protobuf.controller.Command_BanFromServer.create({
minutes, userName, address, reason, visibleReason, clientid, removeMessages
});
const sc = webClient.protobuf.controller.ModeratorCommand.create({
'.Command_BanFromServer.ext': command
});
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_BanFromServer.ext': command });
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
const { responseCode } = raw;

View file

@ -3,10 +3,7 @@ import { ModeratorPersistence } from '../../persistence';
export function getBanHistory(userName: string): void {
const command = webClient.protobuf.controller.Command_GetBanHistory.create({ userName });
const sc = webClient.protobuf.controller.ModeratorCommand.create({
'.Command_GetBanHistory.ext': command
});
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_GetBanHistory.ext': command });
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
const { responseCode } = raw;

View file

@ -3,10 +3,7 @@ import { ModeratorPersistence } from '../../persistence';
export function getWarnHistory(userName: string): void {
const command = webClient.protobuf.controller.Command_GetWarnHistory.create({ userName });
const sc = webClient.protobuf.controller.ModeratorCommand.create({
'.Command_GetWarnHistory.ext': command
});
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_GetWarnHistory.ext': command });
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
const { responseCode } = raw;

View file

@ -3,10 +3,7 @@ import { ModeratorPersistence } from '../../persistence';
export function getWarnList(modName: string, userName: string, userClientid: string): void {
const command = webClient.protobuf.controller.Command_GetWarnList.create({ modName, userName, userClientid });
const sc = webClient.protobuf.controller.ModeratorCommand.create({
'.Command_GetWarnList.ext': command
});
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_GetWarnList.ext': command });
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
const { responseCode } = raw;

View file

@ -1,12 +1,10 @@
import webClient from '../../WebClient';
import { ModeratorPersistence } from '../../persistence';
import { LogFilters } from 'types';
export function viewLogHistory(filters): void {
export function viewLogHistory(filters: LogFilters): void {
const command = webClient.protobuf.controller.Command_ViewLogHistory.create(filters);
const sc = webClient.protobuf.controller.ModeratorCommand.create({
'.Command_ViewLogHistory.ext': command
});
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_ViewLogHistory.ext': command });
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
const { responseCode } = raw;

View file

@ -3,10 +3,7 @@ import { ModeratorPersistence } from '../../persistence';
export function warnUser(userName: string, reason: string, clientid?: string, removeMessage?: boolean): void {
const command = webClient.protobuf.controller.Command_BanFromServer.create({ userName, reason, clientid, removeMessage });
const sc = webClient.protobuf.controller.ModeratorCommand.create({
'.Command_WarnUser.ext': command
});
const sc = webClient.protobuf.controller.ModeratorCommand.create({ '.Command_WarnUser.ext': command });
webClient.protobuf.sendModeratorCommand(sc, (raw) => {
const { responseCode } = raw;