Is it possible to get DevForum API from a roblox script. If so, is it possible for me to find the solution to a specific dev forum post? I’m currently working on a module which I update quite frequently. I can see how this can be kind of annoying for peopel who just want to download the model and use it without ever having to update it. Some people may also not want to require the module using the asset ID, because if they did they wouldn’t be able to adjust settings easily. I want to make the module as user-friendly as possible so I figured if I could find the solution to my post (which is always the latest update), and compared it to the version of the module I could update it automatically.
If anybody knows how to do this, please let me know, it’ll help a lot. If you know another way of updating automatically I would also appreciate it.
I think there is something called packages or something of the sort. I have also seen that many other modules have a script that checks their module version and updates directly from the script. I think I have seen profile service do it, so you can check their source code
Just looked through the source a little bit, and I see a function titled CheckForNewGlobalUpdates, however from what I see, correct me if I’m wrong, this is a way to globally update a profile created by the module, as apposed to updating the module itself.
I found this piece of code from my friends old datastore module I hope this helps
local InsertService = game:GetService("InsertService")
local ServerStorage = game:GetService("ServerStorage")
local MODEL_ID = 6474226265
local CHECK_UPDATE_INTERVAL = 5
local currentModel = ServerStorage:FindFirstChild("QuickNetwork")
local function CheckForUpdate(model)
local version = model:FindFirstChild("Version")
if not version then
return
end
if model.Version.Value ~= currentModel.Version.Value then
model:Clone().Parent = ServerStorage
currentModel:Destroy()
currentModel = model
end
end
while true do
local success, response = pcall(InsertService.LoadAsset, InsertService, MODEL_ID)
if success then
CheckForUpdate(response.QuickNetwork)
else
warn(response)
end
wait(CHECK_UPDATE_INTERVAL)
end