diff options
| author | Max Isom <[email protected]> | 2021-11-17 16:07:29 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-17 16:07:29 -0500 |
| commit | 41b050a2f1fe4e2cb94629e2add1b490a69a2004 (patch) | |
| tree | 78a10ca06380acfa6a114b734b206325b06610ad /src/commands/help.ts | |
| parent | a4e67d63839154916783e7b4a5f6c65006e759f3 (diff) | |
| parent | 96bf53b28a9cfa30e1d171ae0539f52fd926e1c2 (diff) | |
| download | muse-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.ts | 12 |
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('🇲'); } |
