improving safety - freezing command object

This commit is contained in:
mmacierzanka committed 2021-08-31 18:40:35 +02:00
1 parent f18f40a1ff
commit 6c687d5a2e
1 file changed
+1
+1
View File
@@ -132,6 +132,7 @@ export class Bot extends EventEmitter {
const helpMsg: Command = new HelpMessage(this.commands, this.messages.help, this.name); const helpMsg: Command = new HelpMessage(this.commands, this.messages.help, this.name);
this.commands.add(helpMsg); this.commands.add(helpMsg);
} }
Object.freeze(this.commands);
process.stdout.write("Connecting to Discord... "); process.stdout.write("Connecting to Discord... ");
this.client.login(this.token); this.client.login(this.token);
this.client.on("ready", async () => { this.client.on("ready", async () => {