diff options
| author | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-07-18 13:35:21 +0100 |
|---|---|---|
| committer | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2026-07-18 13:35:21 +0100 |
| commit | 33fc86d95c7339525d46d0707b45d303a664f49f (patch) | |
| tree | b1d543a71f1cc700db327bd4e105dfb145388bc7 /174bg/discord-bot/utilities/getUrl.js | |
| parent | 75fe60c1d8014c2613f487799b2d4168493d2979 (diff) | |
| download | unnamed-group-33fc86d95c7339525d46d0707b45d303a664f49f.tar unnamed-group-33fc86d95c7339525d46d0707b45d303a664f49f.tar.gz unnamed-group-33fc86d95c7339525d46d0707b45d303a664f49f.tar.bz2 unnamed-group-33fc86d95c7339525d46d0707b45d303a664f49f.tar.xz unnamed-group-33fc86d95c7339525d46d0707b45d303a664f49f.zip | |
populate uex_items
Diffstat (limited to '174bg/discord-bot/utilities/getUrl.js')
| -rw-r--r-- | 174bg/discord-bot/utilities/getUrl.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/174bg/discord-bot/utilities/getUrl.js b/174bg/discord-bot/utilities/getUrl.js new file mode 100644 index 0000000..49342d9 --- /dev/null +++ b/174bg/discord-bot/utilities/getUrl.js @@ -0,0 +1,5 @@ +export default async (url) => { + const response = await fetch(url); + if (!response.ok) return null; + return await response.json(); +}; |
