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,
|
||||||
if data.ClassName == "RichEmbed" then
|
avatar_url = self.avatarUrl
|
||||||
request = {
|
|
||||||
embeds = {data},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print("Sending RichEmbed")
|
if data.ClassName == "RichEmbed" then
|
||||||
|
request.embeds = {data}
|
||||||
|
|
||||||
elseif data.ClassName == "Message" then
|
elseif data.ClassName == "Message" then
|
||||||
print("Sending Message")
|
print("Sending Message")
|
||||||
|
|
Reference in New Issue