const mongoose = require('mongoose'); const Schema = mongoose.Schema; let suggestion = new Schema( { authorID: {type: String, required: false, max: 100}, authorName: {type:String, required: true}, guildID: {type:String, required: true}, authorPermissions: {type:Array, required: true}, suggestion:{type:String, required: true} } ); const Suggestion = module.exports = mongoose.model('suggestion', suggestion); module.exports.get = (callback, limit)=> { Suggestion.find(callback).limit(limit); }