Help with DevForums API

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.

Check this out

Hello, can you explain more of what is happening to you?
Thanks,
Aaditya :herb:

Looks promising, but how exactly do I use 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

1 Like

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 do not really understand what you mean by updating an profile created by the module rather then updating the module itself

The profiles are the data stores, and the function updates the profile globally. I don’t think it updates the actual module.

oh thats not what I meant. Uhh let me check the source code rq

1 Like

Oh you are right I will try to find another module that has an implementation of what I said.

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
1 Like