Friday, September 20, 2024 2:34:12 AM
> settings

Customize


Authenticate

> update_server_settings.js
const ESMCommand = require("../esm_command");
module.exports = class ESMCommand_UpdateServerSettings extends ESMCommand {
    constructor(bot) {
        super(bot);
        this.permissions = {
            restricted: true
        };
    }

    async fromDiscord() {
        this.info = await this.db.startCommand(this);
        let server = await this.db.authenticateServer(this.params.server_key);
        if (this.util.isEmpty(server)) return false;

        // We've changed the serverID, adjust the WSS
        if (!_.isNull(this.params.server_id)) {
            this.wss.removeServer(this.params.server_id);
        } else {
            this.wss.disconnect(server.id);
        }
    }
}
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8