src/Database/MongoProvider.js
/**
     * Initialises a default Guild config.
     * Use default AxonClient prefix settings when creating the new guild config.
     *
     * @param {String} gID - Guild ID
     *
     * @returns {Promise<GuildConfig|null>} Newly created Guild config from the DB
     * @memberof MongoProvider
     */
Initialises a default Guild config.
Use default AxonClient prefix settings when creating the new guild config.

@param {String} gID - Guild ID

@returns {Promise} Newly created Guild config from the DB
@memberof MongoProvider
Initialises a default Guild config . Use default AxonClient prefix settings when creating the new guild config . @param { String } gID - Guild ID @returns { Promise } Newly created Guild config from the DB @memberof MongoProvider
async initGuild(gID) {
        const data = await this.GuildSchema.findOneAndUpdate( {
            guildID: gID,
        },
        {
            guildID: gID,
            prefixes: this.axon.settings.prefixes,
            updatedAt: new Date(),
        },
        {
            new: true,
            upsert: true,
            setDefaultsOnInsert: true,
        } ).lean().exec();
        return data && new this.GuildConfig(this.axon, data);
    }
async initGuild ( gID ) { const data = await this . GuildSchema . findOneAndUpdate ( { guildID : gID , } , { guildID : gID , prefixes : this . axon . settings . prefixes , updatedAt : new Date ( ) , } , { new : true , upsert : true , setDefaultsOnInsert : true , } ) . lean ( ) . exec ( ) ; return data && new this . GuildConfig ( this . axon , data ) ; }
Initialises a default Guild config.
Initialises a default Guild config .