Comparing version 6.6.7 to 6.7.7
{ | ||
"name": "azel", | ||
"version": "6.6.7", | ||
"version": "6.7.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,10 +0,29 @@ | ||
const { Message, MessageEmbed } = require("discord.js") | ||
const { Message } = require("discord.js") | ||
async function someone(message, mention = false) { | ||
class someone { | ||
/** | ||
* @name someone | ||
* @param constructor | ||
* @param {Object} options | ||
* @param {any} [options.message] the discord message | ||
* @param {any} [options.member] pick a member | ||
* @param {boolean} [options.mention] mention the member if it's true | ||
*/ | ||
constructor(options) { | ||
if(!options.message) throw new TypeError('Voider Error: Missing argument message'); | ||
if(typeof options.mention !== 'boolean') throw new TypeError('Voider Error: mention argument must be a boolean') | ||
const eh = message.guild.members.cache.random() | ||
this.message = options.message; | ||
this.mention = options.mention; | ||
} | ||
return eh; | ||
async start() { | ||
if(this.mention === true) { | ||
this.message.channel.send(`<@${this.message.guild.members.cache.random().id}>`) | ||
} else { | ||
this.message.channel.send(this.message.guild.members.cache.random().nickname || this.message.guild.members.cache.random().user.username) | ||
} | ||
} | ||
} | ||
module.exports = someone |
42120
780