woomy/commands/level.js

28 lines
693 B
JavaScript
Raw Normal View History

2020-04-20 04:52:50 +00:00
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
2020-04-20 03:02:10 +00:00
2020-04-01 08:33:02 +00:00
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ['plevel', 'permlevel'],
2020-04-04 09:16:05 +00:00
permLevel: 'User',
2020-04-01 08:33:02 +00:00
requiredPerms: [],
cooldown: 2000
}
exports.help = {
name: 'level',
2020-04-11 09:30:51 +00:00
category: 'Bot',
2020-04-01 08:33:02 +00:00
description: 'Returns your permission level.',
2020-04-06 09:36:32 +00:00
usage: 'level',
parameters: ''
2020-04-01 08:33:02 +00:00
}
exports.run = async (client, message, args, level, data) => {
2020-04-01 08:33:02 +00:00
try {
const friendly = client.config.permLevels.find(l => l.level === level).name
2020-04-06 16:35:06 +00:00
message.reply(`Your permission level is: ${friendly} (${level})`)
2020-04-01 08:33:02 +00:00
} catch (err) {
message.channel.send('There was an error!\n' + err).catch()
}
}