Add ability to register commands and events to specific environments #50

Merged
Vylpes merged 2 commits from feature/38-command-envs into develop 2023-10-14 17:07:29 +01:00
Showing only changes of commit b6944f0876 - Show all commits

View file

@ -15,7 +15,7 @@ export class Util {
for (let command of globalCommands) { for (let command of globalCommands) {
if (!command.Command.CommandBuilder) continue; if (!command.Command.CommandBuilder) continue;
if ((command.Environment & CoreClient.Environment) == CoreClient.Environment) { if (command.Environment &= CoreClient.Environment) {
Vylpes marked this conversation as resolved Outdated

Should we be using the same &= as above? To keep it consistent.

Should we be using the same `&=` as above? To keep it consistent.
globalCommandData.push(command.Command.CommandBuilder); globalCommandData.push(command.Command.CommandBuilder);
} }
} }
@ -43,7 +43,7 @@ export class Util {
for (let command of guildCommands.filter(x => x.ServerId == guild)) { for (let command of guildCommands.filter(x => x.ServerId == guild)) {
if (!command.Command.CommandBuilder) continue; if (!command.Command.CommandBuilder) continue;
if ((command.Environment & CoreClient.Environment) == CoreClient.Environment) { if (command.Environment &= CoreClient.Environment) {
Vylpes marked this conversation as resolved Outdated

Should we be using the same &= as above? To keep it consistent.

Should we be using the same `&=` as above? To keep it consistent.
guildCommandData.push(command.Command.CommandBuilder); guildCommandData.push(command.Command.CommandBuilder);
} }
} }