You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I am trying to figure out how I can apply forGuild commands while in my dev environment and apply commands globally for my production environment? I tried looking through the slash commands logic but could not figure out where exactly the global command registration took place. I have also tried to conditionally defined the registerSlashCommands property as either my forGuild value or null/undefined but that produces an error on TypeError: Cannot read properties of null (reading 'map') at RegisterCommandService.<anonymous> (/home/foestauf/casino/node_modules/@discord-nestjs/core/src/services/register-command.service.ts:49:30)
Any thoughts as to how I could achieve this or how are is everyone else handling this?
Edit: sigh if only I would of found this two minutes ago. Spread operator syntax is what I did to figure this out. ...(isDev && { registerCommandOptions: [ { forGuild: <guildid>, removeCommandsBeforeRegister: true, }, ], }),
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello! I am trying to figure out how I can apply forGuild commands while in my dev environment and apply commands globally for my production environment? I tried looking through the slash commands logic but could not figure out where exactly the global command registration took place. I have also tried to conditionally defined the registerSlashCommands property as either my forGuild value or null/undefined but that produces an error on
TypeError: Cannot read properties of null (reading 'map') at RegisterCommandService.<anonymous> (/home/foestauf/casino/node_modules/@discord-nestjs/core/src/services/register-command.service.ts:49:30)
Any thoughts as to how I could achieve this or how are is everyone else handling this?
Edit: sigh if only I would of found this two minutes ago. Spread operator syntax is what I did to figure this out.
...(isDev && { registerCommandOptions: [ { forGuild: <guildid>, removeCommandsBeforeRegister: true, }, ], }),
Beta Was this translation helpful? Give feedback.
All reactions