const mongoose = require('mongoose'); const Schema = mongoose.Schema; let guild = new Schema( { name: {type: String, required: false, max: 100}, memberCount: {type:Number, required: false}, gID:{type:String, required:true, unique:true}, allowInvites:{type:Boolean, required:true}, strikes:{type:Boolean}, music:{type:Boolean}, ytFeeds:{type:Boolean} } ); const Guild = module.exports = mongoose.model('guild', guild); module.exports.get = (callback, limit)=> { Guild.find(callback).limit(limit); }