mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
9 lines
357 B
Lua
9 lines
357 B
Lua
local net = require("@lune/net")
|
|
|
|
local runtime, version = table.unpack(_VERSION:split(" "))
|
|
local expectedUserAgent = runtime:lower() .. "/" .. version
|
|
|
|
local userAgent: string =
|
|
net.jsonDecode(net.request("https://www.whatsmyua.info/api/v1/ua").body)[1].ua.rawUa
|
|
|
|
assert(userAgent == expectedUserAgent, "Expected user agent to be " .. expectedUserAgent)
|