Updated setUsername and setAvatar
This commit is contained in:
parent
4a6d82ceeb
commit
37e04cc54a
|
@ -20,22 +20,22 @@ function RoHook.new(url, username, avatar)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
function RoHook:setUsername()
|
function RoHook:setUsername(username)
|
||||||
--
|
self.username = username
|
||||||
end
|
end
|
||||||
|
|
||||||
function RoHook:setAvatar(url)
|
function RoHook:setAvatar(url)
|
||||||
|
self.avatarUrl = url
|
||||||
end
|
end
|
||||||
|
|
||||||
function RoHook:send(data)
|
function RoHook:send(data)
|
||||||
local request = nil
|
local request = {
|
||||||
|
username = self.username,
|
||||||
|
avatar_url = self.avatarUrl
|
||||||
|
}
|
||||||
|
|
||||||
if data.ClassName == "RichEmbed" then
|
if data.ClassName == "RichEmbed" then
|
||||||
request = {
|
request.embeds = {data}
|
||||||
embeds = {data},
|
|
||||||
}
|
|
||||||
|
|
||||||
print("Sending RichEmbed")
|
|
||||||
|
|
||||||
elseif data.ClassName == "Message" then
|
elseif data.ClassName == "Message" then
|
||||||
print("Sending Message")
|
print("Sending Message")
|
||||||
|
|
Reference in New Issue