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