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) {
if (!command.Command.CommandBuilder) continue;
if ((command.Environment & CoreClient.Environment) == CoreClient.Environment) {
if (command.Environment &= CoreClient.Environment) {
globalCommandData.push(command.Command.CommandBuilder);
}
}
@ -43,7 +43,7 @@ export class Util {
for (let command of guildCommands.filter(x => x.ServerId == guild)) {
if (!command.Command.CommandBuilder) continue;
if ((command.Environment & CoreClient.Environment) == CoreClient.Environment) {
if (command.Environment &= CoreClient.Environment) {
guildCommandData.push(command.Command.CommandBuilder);
}
}