From 74aa072bfb0f49529eb74728d302fb8a718b4ff6 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Mon, 3 Mar 2025 04:03:49 -0800 Subject: [PATCH] Fix /formathelp for past-gen formats NatDex Mod refactor caught a bug. `format.gen` isn't meaningful. ...maybe it should be... Main concern would be perf impact, to load all the datamods to get their gen. Probably not worth it? --- server/chat-commands/info.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/chat-commands/info.ts b/server/chat-commands/info.ts index c9e52c2d8e..5047aae62a 100644 --- a/server/chat-commands/info.ts +++ b/server/chat-commands/info.ts @@ -1944,7 +1944,8 @@ export const commands: Chat.ChatCommands = { descHtml.push(...format.threads); } else { const genID = ['rb', 'gs', 'rs', 'dp', 'bw', 'xy', 'sm', 'ss', 'sv']; - descHtml.push(`This format has no resources linked on its Smogon Dex page. ` + + const gen = Dex.forFormat(format).gen; + descHtml.push(`This format has no resources linked on its Smogon Dex page. ` + `Please contact a C&C Leader to resolve this. ` + `Alternatively, if this format can't have a page on the Smogon Dex, message dhelmise.
`); }