This commit is contained in:
Emily 2020-04-07 18:10:01 +10:00
parent 1b9c4c900a
commit 0ac043371f
4 changed files with 120 additions and 28 deletions

View File

@ -45,7 +45,7 @@ exports.run = (client, message, args, level, data) => {
categories.sort().forEach((cat) => {
const filtered = commands.filter((cmd) => cmd.help.category === cat)
embed.addField(cat + ` [${filtered.size}]`, filtered.map((cmd) => '`' + cmd.help.name + '`').join(', '))
embed.addField(cat + ` [${filtered.size}]`, filtered.map((cmd) => '`' + cmd.help.name + '`').join(', '), true)
})
if (message.guild && data.guild.customCommands.length > 0) {

View File

@ -15,7 +15,6 @@ exports.help = {
}
exports.run = async (client, message, args, level, data) => {
var firstName, secondName
var rating = Math.floor(Math.random() * 100) + 1
var hearts = [
'❤️',
@ -30,21 +29,8 @@ exports.run = async (client, message, args, level, data) => {
return message.channel.send('<:error:466995152976871434> Please include two names/users.')
}
if (message.guild && message.mentions.members && message.mentions.members.size > 0) {
firstName = message.mentions.members.first().displayName
}
if (message.guild && message.mentions.members && message.mentions.members.size > 1) {
secondName = message.mentions.members.last().displayName
}
if (!firstName) {
firstName = args[0]
}
if (!secondName) {
secondName = args[1]
}
const firstName = args[0]
const secondName = args[1]
const shipName = firstName.substr(0, firstName.length * 0.5) + secondName.substr(secondName.length * 0.5)

102
file.log
View File

@ -899,3 +899,105 @@
2020-04-07T02:34:55 | info | index.js | Loading 7 events.
2020-04-07T02:34:55 | info | mongoose.js | Connected to the database.
2020-04-07T02:34:57 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T11:48:46 | info | index.js | Loading 5 commands.
2020-04-07T11:48:46 | info | index.js | Loading 7 events.
2020-04-07T11:48:46 | info | mongoose.js | Connected to the database.
2020-04-07T11:48:48 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T11:59:26 | log | message.js | Command ran: help
2020-04-07T12:06:42 | log | message.js | Command ran: help
2020-04-07T12:12:46 | log | message.js | Command ran: help
2020-04-07T12:17:41 | log | message.js | Command ran: help
2020-04-07T12:18:17 | info | index.js | Loading 5 commands.
2020-04-07T12:18:17 | info | index.js | Loading 7 events.
2020-04-07T12:18:17 | info | mongoose.js | Connected to the database.
2020-04-07T12:18:19 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T12:18:19 | log | message.js | Command ran: help
2020-04-07T12:36:21 | info | index.js | Loading 5 commands.
2020-04-07T12:36:21 | info | index.js | Loading 7 events.
2020-04-07T12:36:21 | info | mongoose.js | Connected to the database.
2020-04-07T12:36:24 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T12:37:20 | log | message.js | Command ran: ship
2020-04-07T12:37:23 | log | message.js | Command ran: ship
2020-04-07T16:24:09 | info | index.js | Loading 5 commands.
2020-04-07T16:24:09 | info | index.js | Loading 7 events.
2020-04-07T16:24:09 | info | mongoose.js | Connected to the database.
2020-04-07T16:24:11 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T16:24:22 | log | message.js | Command ran: help
2020-04-07T16:30:54 | log | message.js | Command ran: help
2020-04-07T17:08:39 | log | message.js | Command ran: ship
2020-04-07T17:16:50 | log | message.js | Command ran: help
2020-04-07T17:19:27 | info | index.js | Loading 5 commands.
2020-04-07T17:19:27 | info | index.js | Loading 7 events.
2020-04-07T17:19:27 | info | mongoose.js | Connected to the database.
2020-04-07T17:19:30 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:20:24 | info | index.js | Loading 5 commands.
2020-04-07T17:20:24 | info | index.js | Loading 7 events.
2020-04-07T17:20:24 | info | mongoose.js | Connected to the database.
2020-04-07T17:20:26 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:20:28 | log | message.js | Command ran: ship
2020-04-07T17:21:08 | info | index.js | Loading 5 commands.
2020-04-07T17:21:08 | info | index.js | Loading 7 events.
2020-04-07T17:21:08 | info | mongoose.js | Connected to the database.
2020-04-07T17:21:10 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:21:19 | log | message.js | Command ran: ship
2020-04-07T17:21:41 | info | index.js | Loading 5 commands.
2020-04-07T17:21:41 | info | index.js | Loading 7 events.
2020-04-07T17:21:41 | info | mongoose.js | Connected to the database.
2020-04-07T17:21:43 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:21:46 | log | message.js | Command ran: ship
2020-04-07T17:22:01 | info | index.js | Loading 5 commands.
2020-04-07T17:22:01 | info | index.js | Loading 7 events.
2020-04-07T17:22:01 | info | mongoose.js | Connected to the database.
2020-04-07T17:22:04 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:22:05 | log | message.js | Command ran: ship
2020-04-07T17:22:26 | info | index.js | Loading 5 commands.
2020-04-07T17:22:27 | info | index.js | Loading 7 events.
2020-04-07T17:22:27 | info | mongoose.js | Connected to the database.
2020-04-07T17:22:29 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:22:31 | log | message.js | Command ran: ship
2020-04-07T17:22:52 | info | index.js | Loading 5 commands.
2020-04-07T17:22:52 | info | index.js | Loading 7 events.
2020-04-07T17:22:52 | info | mongoose.js | Connected to the database.
2020-04-07T17:22:55 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:22:56 | log | message.js | Command ran: ship
2020-04-07T17:24:17 | info | index.js | Loading 5 commands.
2020-04-07T17:24:17 | info | index.js | Loading 7 events.
2020-04-07T17:24:17 | info | mongoose.js | Connected to the database.
2020-04-07T17:24:20 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:24:22 | info | index.js | Loading 5 commands.
2020-04-07T17:24:22 | info | index.js | Loading 7 events.
2020-04-07T17:24:22 | info | mongoose.js | Connected to the database.
2020-04-07T17:24:30 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:24:35 | log | message.js | Command ran: ship
2020-04-07T17:25:51 | info | index.js | Loading 5 commands.
2020-04-07T17:25:51 | info | index.js | Loading 7 events.
2020-04-07T17:25:51 | info | mongoose.js | Connected to the database.
2020-04-07T17:25:54 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:26:46 | log | message.js | Command ran: eval
2020-04-07T17:27:13 | log | message.js | Command ran: eval
2020-04-07T17:27:25 | log | message.js | Command ran: eval
2020-04-07T17:29:21 | info | index.js | Loading 5 commands.
2020-04-07T17:29:21 | info | index.js | Loading 7 events.
2020-04-07T17:29:21 | info | mongoose.js | Connected to the database.
2020-04-07T17:29:23 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:29:37 | info | index.js | Loading 5 commands.
2020-04-07T17:29:37 | info | index.js | Loading 7 events.
2020-04-07T17:29:37 | info | mongoose.js | Connected to the database.
2020-04-07T17:29:39 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:31:03 | log | message.js | Command ran: eval
2020-04-07T17:58:55 | info | index.js | Loading 5 commands.
2020-04-07T17:58:55 | info | index.js | Loading 7 events.
2020-04-07T17:58:55 | info | mongoose.js | Connected to the database.
2020-04-07T17:59:00 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T17:59:02 | log | message.js | Command ran: ship
2020-04-07T17:59:17 | log | message.js | Command ran: ship
2020-04-07T18:00:43 | info | index.js | Loading 5 commands.
2020-04-07T18:00:43 | info | index.js | Loading 7 events.
2020-04-07T18:00:43 | info | mongoose.js | Connected to the database.
2020-04-07T18:00:45 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T18:00:50 | log | message.js | Command ran: ship
2020-04-07T18:07:47 | info | index.js | Loading 5 commands.
2020-04-07T18:07:47 | info | index.js | Loading 7 events.
2020-04-07T18:07:47 | info | mongoose.js | Connected to the database.
2020-04-07T18:07:49 | ready | ready.js | Connected to Discord as WoomyDev#4547
2020-04-07T18:07:57 | log | message.js | Command ran: ship

View File

@ -195,17 +195,6 @@ module.exports = client => {
const members = []
let member
// Try mention
if (search.startsWith('<@') && search.endsWith('>')) {
let mention = search.slice(2, -1)
if (mention.startsWith('!')) {
mention = mention.slice(1)
}
return guild.members.cache.get(mention)
}
// Try ID search
if (!isNaN(search) === true) {
members.push(guild.members.cache.get(search))
@ -233,6 +222,21 @@ module.exports = client => {
return members
}
// USER OBJECT FROM MENTION
client.getUserFromMention = mention => {
if (!mention) return
if (mention.startsWith('<@') && mention.endsWith('>')) {
mention = mention.slice(2, -1)
if (mention.startsWith('!')) {
mention = mention.slice(1)
}
return client.users.cache.get(mention)
}
}
client.findRole = function (guild, search) {
var role = guild.roles.cache.find(r => r.name.toLowerCase() === search.toLowerCase())
if (!role) {