tags: fix !tag list failing if there are too many tags

This commit is contained in:
Dragory 2020-08-02 16:01:22 +03:00
parent 6caf7b1304
commit 9681ddcc40
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -1,4 +1,5 @@
import { tagsCmd } from "../types";
import { createChunkedMessage } from "../../../utils";
export const TagListCmd = tagsCmd({
trigger: ["tag list", "tags", "taglist"],
@ -13,6 +14,7 @@ export const TagListCmd = tagsCmd({
const prefix = pluginData.config.getForMessage(msg).prefix;
const tagNames = tags.map(tag => tag.tag).sort();
msg.channel.createMessage(`Available tags (use with ${prefix}tag): \`\`\`${tagNames.join(", ")}\`\`\``);
createChunkedMessage(msg.channel, `Available tags (use with ${prefix}tag): \`\`\`${tagNames.join(", ")}\`\`\``);
},
});