I am trying to make a Shop Refresh bot in discord, it works as intented but the problem is that if there are multiple servers running, it will still send the Request.
What I have tried to do was make a DataStore for just the date save and if the date is not the same as the saved one in DataStore, it would send the message.
I was thinking of maybe doing like a proxy that would constantly check for changed value but I don’t know how I would search that up.
The following is the part of the code that checks every hour
Yes I have used someone elses proxy to run discord webhooks, could it also be that issue?
local savedData = discordDSS:GetAsync("SentMSG")
if savedData ~= currentDay or savedData == nil then
local contento = [[---------------------
]]
for _, iteMOS in pairs(currentShopItems) do
print(iteMOS)
if iteMOS:FindFirstChild("Test") then
local msg = [[**THISISASTARSOF** :star2: NAMEOFTHISITEMSHOULDNOTBETHISLONG
]]
msg = string.gsub(msg, "THISISASTARSOF", iteMOS.Test.Data.Rarity.Value)
msg = string.gsub(msg, "NAMEOFTHISITEMSHOULDNOTBETHISLONG", iteMOS.Name)
contento = contento.. msg
else
local msg = [[**THISISASTARSOF** :star2: NAMEOFTHISITEMSHOULDNOTBETHISLONG
]]
msg = string.gsub(msg, "THISISASTARSOF", iteMOS.Data.Rarity.Value)
msg = string.gsub(msg, "NAMEOFTHISITEMSHOULDNOTBETHISLONG", iteMOS.Name)
contento = contento.. msg
end
end
req.Content = contento
req:sendMessage(url)
discordDSS:SetAsync("SentMSG", currentDay)
end