I was looking through some HTML code when I came across this snippet
I also want to get a dictionary file into a Roblox game (using this dictionary api was too slow) but I find it impossible to copy paste a 6.5 megabyte dictionary file into a script, it is just too slow.
Is there any way to require a txt file in the same way as this code is doing?
My only lead would be the File
keyword, but it does not seem to do anything.
Here is the link to the original website: Fillability Checker
And here is the code that I need to make faster:
local HTTPS = game:GetService("HttpService")
local Url = "https://api.dictionaryapi.dev/api/v2/entries/en/"
local module = {}
local function PFunk(Url)
return pcall(function()
return HTTPS:GetAsync(Url)
end)
end
module.IsAWord = function(Word)
local WordUrl = Url..tostring(Word)
local Success, WordData = PFunk(WordUrl)
if string.find(WordData,"HTTP 429") then --Too many requests
repeat
print("b")
wait(5)
local Success, WordData = PFunk(WordUrl)
until not string.find(WordData,"HTTP 429")
end
return Success
end
return module