unfinished, need to fix list
This commit is contained in:
parent
d4b00b9522
commit
f86e7fe72f
1 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
const Embed = require('../../util/embed');
|
||||
|
||||
module.exports = class {
|
||||
constructor (name, category) {
|
||||
this.name = name,
|
||||
|
@ -17,6 +19,19 @@ module.exports = class {
|
|||
|
||||
async run (client, message, [action, ...user], data) {
|
||||
if (!action || action.toLowerCase() === 'list') {
|
||||
const list = [];
|
||||
for (const user in data.guild.blocklist) {
|
||||
const userObj = message.channel.guild.members.get(user.id);
|
||||
list.push(`${userObj.username}#${userObj.discriminator}`)
|
||||
}
|
||||
|
||||
console.log(list)
|
||||
const embed = new Embed()
|
||||
.setTitle('')
|
||||
.setDescription('```\n' + list.join(', ') + '```');
|
||||
|
||||
message.channel.createMessage({ embed: embed });
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue