aboutsummaryrefslogtreecommitdiff
path: root/src/commands/help.ts
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2021-11-17 16:07:29 -0500
committerGitHub <[email protected]>2021-11-17 16:07:29 -0500
commit41b050a2f1fe4e2cb94629e2add1b490a69a2004 (patch)
tree78a10ca06380acfa6a114b734b206325b06610ad /src/commands/help.ts
parenta4e67d63839154916783e7b4a5f6c65006e759f3 (diff)
parent96bf53b28a9cfa30e1d171ae0539f52fd926e1c2 (diff)
downloadmuse-41b050a2f1fe4e2cb94629e2add1b490a69a2004.tar.xz
muse-41b050a2f1fe4e2cb94629e2add1b490a69a2004.zip
Merge pull request #397 from Hellysonrp/discord-js-v13
Diffstat (limited to 'src/commands/help.ts')
-rw-r--r--src/commands/help.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/commands/help.ts b/src/commands/help.ts
index f150c54..7058efd 100644
--- a/src/commands/help.ts
+++ b/src/commands/help.ts
@@ -1,4 +1,4 @@
-import {Message} from 'discord.js';
+import {Message, Util} from 'discord.js';
import {injectable} from 'inversify';
import Command from '.';
import {TYPES} from '../types.js';
@@ -29,7 +29,7 @@ export default class implements Command {
const {prefix} = settings;
- const res = this.commands.sort((a, b) => a.name.localeCompare(b.name)).reduce((content, command) => {
+ const res = Util.splitMessage(this.commands.sort((a, b) => a.name.localeCompare(b.name)).reduce((content, command) => {
const aliases = command.aliases.reduce((str, alias, i) => {
str += alias;
@@ -53,9 +53,13 @@ export default class implements Command {
content += '\n';
return content;
- }, '');
+ }, ''));
+
+ for (const r of res) {
+ // eslint-disable-next-line no-await-in-loop
+ await msg.author.send(r);
+ }
- await msg.author.send(res, {split: true});
await msg.react('🇩');
await msg.react('🇲');
}