This commit is contained in:
Norberto A 2020-06-07 22:52:47 +01:00 committed by GitHub
parent 876e1ef040
commit 15ff65c71d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -85,7 +85,7 @@ function module.newMessage(message)
title = string.sub(title, 1, 256) title = string.sub(title, 1, 256)
end end
if(description and string.len(description > 2048)) then if(description and string.len(description) > 2048) then
warn("Description cannot be longer than 2048 characters.") warn("Description cannot be longer than 2048 characters.")
description = string.sub(description, 1, 2048) description = string.sub(description, 1, 2048)
end end
@ -195,8 +195,10 @@ function module:send(content)
content = httpService:JSONEncode(content) content = httpService:JSONEncode(content)
print(content)
local success, data = pcall(function() local success, data = pcall(function()
return httpService:PostAsync(module.webhookConfig.webhookUrl, content) --return httpService:PostAsync(module.webhookConfig.webhookUrl, content)
end) end)
return success, data return success, data