Skip to content

Commit

Permalink
/randombattles: Display sets for the battle format
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnikaCodes committed Jun 9, 2021
1 parent c3d4f80 commit 264831e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/chat-plugins/random-battles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ export const commands: Chat.ChatCommands = {
randbats: 'randombattles',
randombattles(target, room, user) {
if (!this.runBroadcast()) return;
if (room?.battle?.format.includes('nodmax')) return this.parse(`/randombattlenodmax ${target}`);
if (room?.battle?.format.includes('doubles')) return this.parse(`/randomdoublesbattle ${target}`);

const args = target.split(',');
if (!args[0]) return this.parse(`/help randombattles`);
let dex = Dex;
Expand Down Expand Up @@ -718,7 +721,7 @@ export const commands: Chat.ChatCommands = {
randsnodmax: 'randombattlenodmax',
randombattlenodmax(target, room, user) {
if (!this.runBroadcast()) return;
if (!target) return this.parse(`/help randombattlenodynamax`);
if (!target) return this.parse(`/help randombattlenodmax`);

const dex = Dex.forFormat('gen8randombattlenodmax');
let species = dex.species.get(target);
Expand Down

0 comments on commit 264831e

Please sign in to comment.