Hellow everyone, i’m want use discrod webhook as a message that the number of group members has changed, but I have an error. What is wrong here and how to fix it?
local HttpService = game:GetService("HttpService")
local url = "discord webhook url"
local function GetMemberCount(GroupID)
local Base = "https://groups.roproxy.com/v1/groups/"
local Request = HttpService:GetAsync(Base .. GroupID)
local Data = HttpService:JSONDecode(Request)
return Data.memberCount
end
if GetMemberCount(here group id) > 63639 then
local data = {
["content"] = "ping me",
["embed"] = {
["title"] = "test",
["description"] = "test",
["color"] = 16711680
}}
local finaldate = HttpService:JSONDecode(data)
HttpService:PostAsync(url, finaldate)
else
print(GetMemberCount(here group id))
end
local HttpService = game:GetService("HttpService")
local url = "discord webhook url"
local function GetMemberCount(GroupID)
local Base = "https://groups.roproxy.com/v1/groups/"
local Request = HttpService:GetAsync(Base .. GroupID)
local Data = HttpService:JSONDecode(Request)
return Data.memberCount
end
if GetMemberCount(here group id) > 63639 then
local data = {
["content"] = "ping me",
["embeds"] = {
{
["title"] = "test",
["description"] = "test",
["color"] = 16711680
}
}
}
local finaldate = HttpService:JSONDecode(data)
HttpService:PostAsync(url, finaldate)
else
print(GetMemberCount(here group id))
end
local HttpService = game:GetService("HttpService")
local url = "discord url"
local function GetMemberCount(GroupID)
local Base = "https://groups.roproxy.com/v1/groups/"
local Request = HttpService:GetAsync(Base .. GroupID)
local Data = HttpService:JSONDecode(Request)
return Data.memberCount
end
if GetMemberCount(5211428) > 63639 then
local data = {
["content"] = "ping me",
["embeds"] = {
{
["title"] = "test",
["description"] = "test",
["color"] = 16711680
}
}
}
local finaldate = HttpService:JSONDecode(data)
HttpService:PostAsync(url, finaldate) --here 29 line
else
print(GetMemberCount(5211428))
end