Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
User commands in mage-validator
import * as mage from 'mage'
import { Acl } from 'mage-validator'
import { IsInt, Max, ValidateNested } from 'class-validator';
import PlayerData from '../types/PlayerData'
export default class {
public gemRegisterBonus: number
public data: PlayerData
public static async execute(state: mage.core.IState, data: PlayerData, gemRegisterBonus: number) {
data.gems += gemRegisterBonus
return data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment