Fix commands that have optional format args
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run

This commit is contained in:
Kris Johnson 2024-11-01 11:41:01 -06:00
parent db8bc7efca
commit b37edb2af5
2 changed files with 2 additions and 2 deletions

View File

@ -325,7 +325,7 @@ export abstract class MessageContext {
}
if (toID(formatOrMod) in Dex.dexes) {
return {dex: Dex.mod(toID(formatOrMod)).includeData(), format: null, isMatch: true};
return {dex: Dex.mod(toID(formatOrMod)), format: null, isMatch: true};
}
return this.extractFormat();

View File

@ -480,7 +480,7 @@ export class Format extends BasicEffect implements Readonly<BasicEffect> {
super(data);
this.mod = Utils.getString(data.mod) || 'gen9';
this.effectType = Utils.getString(data.effectType) as FormatEffectType || 'Format';
this.effectType = Utils.getString(data.effectType) as FormatEffectType || 'Condition';
this.debug = !!data.debug;
this.rated = (typeof data.rated === 'string' ? data.rated : data.rated !== false);
this.gameType = data.gameType || 'singles';