1 |
rakin |
5 |
const MessageEmbed = require("../src/MessageEmbed"); |
2 |
|
|
const { escapeRegex } = require("../src/util"); |
3 |
|
|
|
4 |
|
|
module.exports = { |
5 |
|
|
async handle(msg, cm) { |
6 |
|
|
if (typeof cm.args[0] === 'undefined') { |
7 |
|
|
await msg.reply({ |
8 |
|
|
embeds: [ |
9 |
|
|
new MessageEmbed() |
10 |
|
|
.setColor('#f14a60') |
11 |
|
|
.setDescription(`This command requires at least one argument.`) |
12 |
|
|
] |
13 |
|
|
}); |
14 |
|
|
|
15 |
|
|
return; |
16 |
|
|
} |
17 |
|
|
|
18 |
|
|
let general_role = msg.mentions.roles?.first(); |
19 |
|
|
|
20 |
|
|
if (!general_role) { |
21 |
|
|
general_role = cm.args[0].trim(); |
22 |
|
|
} |
23 |
|
|
|
24 |
|
|
app.config.set("gen_role", general_role.id); |
25 |
|
|
app.config.write(); |
26 |
|
|
|
27 |
|
|
await msg.reply({ |
28 |
|
|
embeds: [ |
29 |
|
|
new MessageEmbed() |
30 |
|
|
.setDescription(`The role has been updated.`) |
31 |
|
|
] |
32 |
|
|
}); |
33 |
|
|
} |
34 |
|
|
}; |