Friday, September 20, 2024 2:51:41 AM
> settings

Customize


Authenticate

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

        this.information = {
            name: "id",
            category: "system",
            help: "Displays the current community's ID. This only works in a community's text channels"
        };
    }

    async fromDiscord() {
        let guild = this.message.guild;
        if (guild == null || !guild.available) return;
        let communityID = await this.db.getCommunityID(guild.id);
        if (communityID == null) {
            return this.ESMBot.send(this.message.channel, this.errors.format(this.message.author, "FAILED_TO_FIND_COMMUNITY"));
        }
        this.ESMBot.send(this.message.channel, `**${guild.name}'s** community ID is: \`${communityID}\`\nFor a list of servers, use \`!servers ${communityID}\``);
    }
}
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8