Friday, September 20, 2024 2:57:52 AM
> settings

Customize


Authenticate

> register.js
const ESMCommand = require("../esm_command");
module.exports = class ESMCommand_Register extends ESMCommand {
    constructor(bot) {
        super(bot);

        this.information = {
            category: "system",
            params: "",
            help: "Provides information on how to link a discord account with a steam account so you can get started using ESM Bot. This command is only available for un-registered users"
        };

        this.configuration = {
            allowedInTextChannels: {
                modifiable: true,
                default: true
            }
        };
    }

    async fromDiscord() {
        let isRegistered = await this.db.isRegistered(this.message.author.id);
        if (isRegistered) {
            return this.ESMBot.send(this.message.channel, `Looks like you are already registered with me! You can check out my commands by running the \`!commands\` command`);
        }

        this.ESMBot.send(this.message.channel, {
            description: `**Hello ${this.message.author.toString()}!**\nWant to use Exile Server Manager to it's fullest? Link your Steam Account to your Discord using the link below.\n\nDuring this process, you will be required to sign into Discord and Steam.`,
            fields: [{
                name: "Registration Link",
                value: `${this.ESMBot.config.DEBUG ? `http://localhost:3000/register` : `https://www.esmbot.com/register`}`
            }]
        });
    }
}
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8