Archived
improving safety - freezing command object
This commit is contained in:
1 parent
f18f40a1ff
commit
6c687d5a2e
1 file changed
+1
@@ -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 () => {
|
||||||
|
|||||||
Reference in new issue
Block a user