From 6e3cdb83ec63b62e820901df98f5bc96ef5ea003 Mon Sep 17 00:00:00 2001 From: Norberto A Date: Mon, 2 Nov 2020 13:54:30 +0000 Subject: [PATCH] Added assert to method setColor --- src/Classes/RichEmbed.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Classes/RichEmbed.lua b/src/Classes/RichEmbed.lua index f04e50f..b1039e7 100644 --- a/src/Classes/RichEmbed.lua +++ b/src/Classes/RichEmbed.lua @@ -47,6 +47,7 @@ function RichEmbed:setTimestamp() end function RichEmbed:setColor(rgb) + assert(rgb, "Color cannot be nil") self.color = rgb.R * 65536 + rgb.G * 256 + rgb.B end