Parent Directory
|
Revision Log
Added base commands
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 prefix = cm.args[0].trim(); | ||
19 | |||
20 | app.config.set("prefix", prefix); | ||
21 | app.config.write(); | ||
22 | |||
23 | await msg.reply({ | ||
24 | embeds: [ | ||
25 | new MessageEmbed() | ||
26 | .setDescription(`The prefix has been updated. (${escapeRegex(prefix)})`) | ||
27 | ] | ||
28 | }); | ||
29 | } | ||
30 | }; |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |