devland.js
Advanced tools
Comparing version 1.1.10 to 1.1.11
@@ -10,3 +10,3 @@ { | ||
"name": "devland.js", | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"description": "A powerful API wrapper for the Discord API designed for modern bots", | ||
@@ -13,0 +13,0 @@ "main": "index.js", |
@@ -34,3 +34,3 @@ const Button = require("./Button") | ||
if(!comp.custom_id) throw new TypeError("Custom Id is undefined") | ||
if(typeof comp.custom_id !== "string") throw new TypeError("The custom Id must be a string") | ||
if(comp.type === 2 && comp.style !== 5 && typeof comp.custom_id !== "string") throw new TypeError("The custom Id must be a string") | ||
if(comp.custom_id.length > 100) throw new TypeError("Custom Id max length of 100") | ||
@@ -37,0 +37,0 @@ if(this.components.find(c => c.custom_id === comp.custom_id)) throw new TypeError("Duplicated custom Id") |
@@ -23,3 +23,3 @@ const { parseEmoji } = require("../util") | ||
if(this.label && this.label.length > 80) throw new TypeError("Label max length of 80") | ||
if(!this.style || (this.style && typeof this.style !== "number")) throw new TypeError("Button style is invalid") | ||
if(typeof this.style !== "number") throw new TypeError("Button style is invalid") | ||
if(this.url && typeof this.url !== "string") throw new TypeError("Button url is invalid") | ||
@@ -26,0 +26,0 @@ if(this.emoji instanceof Emoji) this.emoji = this.emoji.pack() |
721839