From 37e04cc54a83ef327582754c4824f5eb5c81b3a3 Mon Sep 17 00:00:00 2001 From: Norberto A Date: Sun, 1 Nov 2020 18:40:36 +0000 Subject: [PATCH] Updated setUsername and setAvatar --- src/RoHook.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/RoHook.lua b/src/RoHook.lua index 77e4412..2207229 100644 --- a/src/RoHook.lua +++ b/src/RoHook.lua @@ -20,22 +20,22 @@ function RoHook.new(url, username, avatar) return self end -function RoHook:setUsername() - -- +function RoHook:setUsername(username) + self.username = username end function RoHook:setAvatar(url) + self.avatarUrl = url end function RoHook:send(data) - local request = nil + local request = { + username = self.username, + avatar_url = self.avatarUrl + } if data.ClassName == "RichEmbed" then - request = { - embeds = {data}, - } - - print("Sending RichEmbed") + request.embeds = {data} elseif data.ClassName == "Message" then print("Sending Message")