Set tag content limit, fixed new pagination showing buttons on single-page messages
This commit is contained in:
parent
9f36a79a2b
commit
2fbd2e3016
2 changed files with 2 additions and 1 deletions
|
@ -78,6 +78,7 @@ class TagsCommand extends Command {
|
|||
|
||||
async setTag(content, name, message, edit = false) {
|
||||
if ((!content || content.length === 0) && message.attachments.length === 0) return "You need to provide the content of the tag!";
|
||||
if (content && content.length >= 2000) return "Your tag content is too long!";
|
||||
if (message.attachments.length !== 0 && content) {
|
||||
await database[edit ? "editTag" : "setTag"](name, { content: `${content} ${message.attachments[0].url}`, author: message.author.id }, message.channel.guild);
|
||||
} else if (message.attachments.length !== 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue