diff --git a/core/package.json b/core/package.json index 9b872b239..05d883b26 100644 --- a/core/package.json +++ b/core/package.json @@ -25,7 +25,7 @@ "cookie": "^0.7.0", "d3-array": "^3.2.4", "dateformat": "^5.0.3", - "discord.js": "14.11.0", + "discord.js": "^14.26.4", "ejs": "^3.1.10", "error-stack-parser": "^2.1.4", "execa": "^5.1.1", diff --git a/locale/ar.json b/locale/ar.json index 686428e18..2118c35fb 100644 --- a/locale/ar.json +++ b/locale/ar.json @@ -302,6 +302,7 @@ "spectate_failed": ".فشل في حل الهدف! خروج الطيف", "spectate_yourself": ".لا يمكنك مشاهدة نفسك", "freeze_yourself": ".لا يمكنك تجميد نفسك", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": ".لا يوجد لاعبين" } }, diff --git a/locale/bg.json b/locale/bg.json index dd03c3780..98a939f03 100644 --- a/locale/bg.json +++ b/locale/bg.json @@ -302,6 +302,7 @@ "spectate_failed": "Не успешно наблюдаване! Излизане от наблюдение.", "spectate_yourself": "Не можеш да наблюдаваш себе си.", "freeze_yourself": "Не можеш да замръзиш себе си.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Няма играчи, към които да се движите." } }, diff --git a/locale/bs.json b/locale/bs.json index 03be97102..15d5f7f18 100644 --- a/locale/bs.json +++ b/locale/bs.json @@ -302,6 +302,7 @@ "spectate_failed": "Failed to resolve the target! Exiting spectate.", "spectate_yourself": "You cannot spectate yourself.", "freeze_yourself": "You cannot freeze yourself.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/cs.json b/locale/cs.json index 2c06fd86e..7c926e289 100644 --- a/locale/cs.json +++ b/locale/cs.json @@ -302,6 +302,7 @@ "spectate_failed": "Nepodařilo se udržet signál pozorování! Vypínám pozorování.", "spectate_yourself": "Nemůžeš pozorovat sebe.", "freeze_yourself": "Nemůžeš zmrazit sebe.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Žádní dostupní hráči, na které by se dalo přepnout." } }, diff --git a/locale/da.json b/locale/da.json index dd92c4562..a341901f2 100644 --- a/locale/da.json +++ b/locale/da.json @@ -302,6 +302,7 @@ "spectate_failed": "Det lykkedes ikke at overvåge målet! Stopper overvågning.", "spectate_yourself": "Du kan ikke overvåge dig selv.", "freeze_yourself": "Du kan ikke fryse dig selv.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Der er ikke flere spillere på rotationen." } }, diff --git a/locale/de.json b/locale/de.json index 969969916..926863797 100644 --- a/locale/de.json +++ b/locale/de.json @@ -302,6 +302,7 @@ "spectate_failed": "Der Spieler konnte nicht beobachtet werden! Beobachtung abgebrochen.", "spectate_yourself": "Du kannst dich nicht selbst beobachten", "freeze_yourself": "Du kannst dich nicht selbst einfrieren", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Es gibt keine Spieler auf die gewechselt werden kann." } }, diff --git a/locale/el.json b/locale/el.json index 0d6ad462f..58e95707a 100644 --- a/locale/el.json +++ b/locale/el.json @@ -302,6 +302,7 @@ "spectate_failed": "Failed to resolve the target! Exiting spectate.", "spectate_yourself": "You cannot spectate yourself.", "freeze_yourself": "You cannot freeze yourself.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/en.json b/locale/en.json index 9bff318fb..351a48540 100644 --- a/locale/en.json +++ b/locale/en.json @@ -302,6 +302,7 @@ "spectate_failed": "Failed to resolve the target! Exiting spectate.", "spectate_yourself": "You cannot spectate yourself.", "freeze_yourself": "You cannot freeze yourself.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/es.json b/locale/es.json index de93c6378..9b9b6b3d6 100644 --- a/locale/es.json +++ b/locale/es.json @@ -302,6 +302,7 @@ "spectate_failed": "¡No se pudo encontrar al objetivo! Saliendo de observar.", "spectate_yourself": "No te puedes observar a ti mismo.", "freeze_yourself": "No te puedes congelar a ti mismo.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/et.json b/locale/et.json index bdb480d86..787925b6d 100644 --- a/locale/et.json +++ b/locale/et.json @@ -302,6 +302,7 @@ "spectate_failed": "Eesmärki ei õnnestunud lahendada! Lahkun Specatatest.", "spectate_yourself": "Sa ei saa ennast specateda.", "freeze_yourself": "Te ei saa ennast külmutada.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/fa.json b/locale/fa.json index 7a5b81d1b..531bc1876 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -302,6 +302,7 @@ "spectate_failed": "Failed to resolve the target! Exiting spectate.", "spectate_yourself": "You cannot spectate yourself.", "freeze_yourself": "You cannot freeze yourself.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/fi.json b/locale/fi.json index 4c8c2c1bd..5fbe4fd78 100644 --- a/locale/fi.json +++ b/locale/fi.json @@ -302,6 +302,7 @@ "spectate_failed": "Virhe kohteen tavoittamisessa!", "spectate_yourself": "Et voi katsoa itseäsi.", "freeze_yourself": "Et voi jäädyttää itseäsi.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/fr.json b/locale/fr.json index cf8bfebc3..c8b357183 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -302,6 +302,7 @@ "spectate_failed": "Impossible de trouver le joueur ! Désactivation du mode surveillance.", "spectate_yourself": "Vous ne pouvez pas vous surveiller vous-même.", "freeze_yourself": "Vous ne pouvez pas vous geler vous-même.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Il n'y a pas de joueurs vers lesquels faire du vélo." } }, diff --git a/locale/hr.json b/locale/hr.json index 299a74483..b228accb3 100644 --- a/locale/hr.json +++ b/locale/hr.json @@ -302,6 +302,7 @@ "spectate_failed": "Neuspješno dohvaćanje igrača! Izlaženje iz gledanja.", "spectate_yourself": "Ne možeš sam sebe gledat.", "freeze_yourself": "Ne možeš sam sebe zalediti.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Nema igrača koje bi gledao." } }, diff --git a/locale/hu.json b/locale/hu.json index 2444639dc..a8fa60125 100644 --- a/locale/hu.json +++ b/locale/hu.json @@ -302,6 +302,7 @@ "spectate_failed": "Hiba a játékos megfigyelésénél! Kilépés a megfigyelésből.", "spectate_yourself": "Magadat nem figyelheted meg.", "freeze_yourself": "Magadat nem fagyaszthatod le.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Nincs megfigyelhető játékos." } }, diff --git a/locale/id.json b/locale/id.json index ad1049973..0b7c04e52 100644 --- a/locale/id.json +++ b/locale/id.json @@ -302,6 +302,7 @@ "spectate_failed": "Pemain tidak ditemukan.", "spectate_yourself": "Anda tidak dapat memantau diri sendiri.", "freeze_yourself": "Anda tidak dapat membekukan diri sendiri.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Tidak ada pemain lain yang dapat dipantau." } }, diff --git a/locale/it.json b/locale/it.json index 2f7200283..adfc98b7d 100644 --- a/locale/it.json +++ b/locale/it.json @@ -302,6 +302,7 @@ "spectate_failed": "Impossibile risolvere il bersaglio! Uscendo dallo Spectate.", "spectate_yourself": "Non puoi spectarti da solo.", "freeze_yourself": "Non puoi freezarti da solo.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/ja.json b/locale/ja.json index 51136d39f..0d875e54f 100644 --- a/locale/ja.json +++ b/locale/ja.json @@ -302,6 +302,7 @@ "spectate_failed": "ターゲットの解決に失敗しました!観戦を終了します", "spectate_yourself": "自分自身は観戦できない", "freeze_yourself": "自分自身を静止することはできない", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "切り替えられる他のプレイヤーがいない" } }, diff --git a/locale/lt.json b/locale/lt.json index 4248edb46..d8ec4633f 100644 --- a/locale/lt.json +++ b/locale/lt.json @@ -302,6 +302,7 @@ "spectate_failed": "Žaidėjas nerastas! Stebėjimas išjungiamas.", "spectate_yourself": "Negalite stebėti savęs.", "freeze_yourself": "Negalite užšaldyti savęs.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Nėra kitų žaidėjų" } }, diff --git a/locale/lv.json b/locale/lv.json index 45c40bae0..2f683e410 100644 --- a/locale/lv.json +++ b/locale/lv.json @@ -302,6 +302,7 @@ "spectate_failed": "Neizdevās atrast spēlētāju! Beidz vērošanu.", "spectate_yourself": "Tu nevari vērot sevi.", "freeze_yourself": "Tu nevari iesaldēt sevi.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Nav neviena cita spēlētāja, ko vērot." } }, diff --git a/locale/mn.json b/locale/mn.json index b9ee8b2c4..8b88c0411 100644 --- a/locale/mn.json +++ b/locale/mn.json @@ -302,6 +302,7 @@ "spectate_failed": "Зорилгоо шийдэж чадсангүй! Үзэсгэлэнгээс гарах.", "spectate_yourself": "Та өөрийгөө харж чадахгүй.", "freeze_yourself": "Та өөрийгөө хөлдөөж чадахгүй.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Өөр тоглогч байхгүй." } }, diff --git a/locale/ne.json b/locale/ne.json index 8a6b88480..7e7101e46 100644 --- a/locale/ne.json +++ b/locale/ne.json @@ -302,6 +302,7 @@ "spectate_failed": "लक्ष्य समाधान गर्न असफल! निगरानी बाहिर निस्कँदै।", "spectate_yourself": "तपाईं आफैंलाई निगरानी गर्न सक्नुहुन्न।", "freeze_yourself": "तपाईं आफैंलाई जमाउन सक्नुहुन्न।", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "साइकल गर्न कुनै खेलाडीहरू छैनन्।" } }, diff --git a/locale/nl.json b/locale/nl.json index ad9b31425..641837158 100644 --- a/locale/nl.json +++ b/locale/nl.json @@ -302,6 +302,7 @@ "spectate_failed": "Kon de speler niet vinden! Spectate aan het afsluiten.", "spectate_yourself": "Je kan jezelf niet spectaten.", "freeze_yourself": "Je kan jezelf niet freezen.", + "teleport_yourself": "Je kan niet naar jezelf teleporteren.", "spectate_cycle_failed": "Er zijn geen spelers om naar door te cyclen." } }, diff --git a/locale/no.json b/locale/no.json index 44d0fa69a..b15008602 100644 --- a/locale/no.json +++ b/locale/no.json @@ -302,6 +302,7 @@ "spectate_failed": "Failed to resolve the target! Exiting spectate.", "spectate_yourself": "You cannot spectate yourself.", "freeze_yourself": "You cannot freeze yourself.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/pl.json b/locale/pl.json index 27fe80319..e8da2487d 100644 --- a/locale/pl.json +++ b/locale/pl.json @@ -302,6 +302,7 @@ "spectate_failed": "Nie udało się rozwiązać celu! Wyjście z Obserwacji.", "spectate_yourself": "Nie możesz obserwować samego siebie.", "freeze_yourself": "Nie możesz zamrozić samego siebie.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Nie ma już więcej graczy do obserwowania." } }, diff --git a/locale/pt.json b/locale/pt.json index 6ba65c014..a1080d289 100644 --- a/locale/pt.json +++ b/locale/pt.json @@ -302,6 +302,7 @@ "spectate_failed": "Erro ao resolver o alvo! Cancelando modo observar.", "spectate_yourself": "Você não pode observar você mesmo.", "freeze_yourself": "Você não pode congelar você mesmo.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Não há mais players para observar." } }, diff --git a/locale/ro.json b/locale/ro.json index d1cf2e149..f5d3e3e6c 100644 --- a/locale/ro.json +++ b/locale/ro.json @@ -302,6 +302,7 @@ "spectate_failed": "Nu a reușit comunicarea cu jucătorul! Ieșire din spectatori.", "spectate_yourself": "Nu poți fi spectator tu însuți.", "freeze_yourself": "Nu te poți îngheța.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/ru.json b/locale/ru.json index 5d7e1c1c7..1f0b0ba27 100644 --- a/locale/ru.json +++ b/locale/ru.json @@ -302,6 +302,7 @@ "spectate_failed": "Не удалось найти цель! Выходим из наблюдения.", "spectate_yourself": "Вы не можете наблюдать за самим собой.", "freeze_yourself": "Вы не можете заморозить себя.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Нет игроков, к которым можно переключиться." } }, diff --git a/locale/sl.json b/locale/sl.json index cefb8f506..b84907dee 100644 --- a/locale/sl.json +++ b/locale/sl.json @@ -302,6 +302,7 @@ "spectate_failed": "Igralca več ni bilo mogoče najti! Izstopam iz Spectate načina.", "spectate_yourself": "Ne moreš spectate-at sam sebe.", "freeze_yourself": "Sam sebe ne moreš zamrzniti.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Ni igralca, na katerega bi lahko preklopili." } }, diff --git a/locale/sv.json b/locale/sv.json index 0bca9c54e..bb3d048fc 100644 --- a/locale/sv.json +++ b/locale/sv.json @@ -302,6 +302,7 @@ "spectate_failed": "Misslyckades att hitta spelaren, avslutar åskådarläget.", "spectate_yourself": "Du kan inte åskåda dig själv.", "freeze_yourself": "Du kan inte frysa dig själv.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Där finns inga spelare att gå mellan." } }, diff --git a/locale/th.json b/locale/th.json index 6fdb953dc..21a3571ca 100644 --- a/locale/th.json +++ b/locale/th.json @@ -302,6 +302,7 @@ "spectate_failed": "ล้มเหลวในการไปหาเป้าหมาย ออกจากโหมดรับชม", "spectate_yourself": "คุณไม่สามารถรับชมตัวเองได้", "freeze_yourself": "คุณไม่สามารถระงับตัวเองได้", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/tr.json b/locale/tr.json index f70f3ae75..6d7214510 100644 --- a/locale/tr.json +++ b/locale/tr.json @@ -302,6 +302,7 @@ "spectate_failed": "Hedef çözülemedi! İzlemeden çıkıldı.", "spectate_yourself": "Kendini izleyemezsiniz.", "freeze_yourself": "Kendini donduramazsın.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "There are no players to cycle to." } }, diff --git a/locale/uk.json b/locale/uk.json index 4ddf38362..72fb31756 100644 --- a/locale/uk.json +++ b/locale/uk.json @@ -302,6 +302,7 @@ "spectate_failed": "Не вдалося визначити ціль! Завершення спостереження.", "spectate_yourself": "Ви не можете спостерігати за собою.", "freeze_yourself": "Ви не можете заморозити себе.", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Немає гравців для циклу спостереження." } }, diff --git a/locale/vi.json b/locale/vi.json index 69c0c69fa..b667806c3 100644 --- a/locale/vi.json +++ b/locale/vi.json @@ -302,6 +302,7 @@ "spectate_failed": "Có lỗi khi thực hiện theo dõi, đang thoát chế độ theo dõi.", "spectate_yourself": "Bạn không thể tự theo dõi chính mình.", "freeze_yourself": "Bạn không thể tự đóng băng bản thân!", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "Không có người chơi để đạp xe đến." } }, diff --git a/locale/zh.json b/locale/zh.json index 818537006..cdc3264d4 100644 --- a/locale/zh.json +++ b/locale/zh.json @@ -302,6 +302,7 @@ "spectate_failed": "无法解析目标!正在退出观看,", "spectate_yourself": "您不能观看您自己", "freeze_yourself": "您不能冻结您自己", + "teleport_yourself": "You cannot teleport to yourself.", "spectate_cycle_failed": "没有可循环的玩家" } }, diff --git a/nui/src/components/PlayerModal/Tabs/DialogActionView.tsx b/nui/src/components/PlayerModal/Tabs/DialogActionView.tsx index 5d72d9480..b50650947 100644 --- a/nui/src/components/PlayerModal/Tabs/DialogActionView.tsx +++ b/nui/src/components/PlayerModal/Tabs/DialogActionView.tsx @@ -225,11 +225,15 @@ const DialogActionView: React.FC = () => { } closeMenu(); - fetchNui("tpToPlayer", { id: assocPlayer.id }); - enqueueSnackbar( - t("nui_menu.player_modal.actions.interaction.notifications.tp_player"), - { variant: "success" } - ); + fetchNui("tpToPlayer", { id: assocPlayer.id }).then(({ success }) => { + + if (success) { + return enqueueSnackbar(t("nui_menu.player_modal.actions.interaction.notifications.tp_player"), { + variant: "success" + }); + } + }); + }; const handleBring = () => { @@ -242,7 +246,7 @@ const DialogActionView: React.FC = () => { variant: "error", }); } - + closeMenu(); fetchNui("summonPlayer", { id: assocPlayer.id }); enqueueSnackbar( diff --git a/package-lock.json b/package-lock.json index 6a6d6410b..d3ebfb00b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,7 +51,7 @@ "cookie": "^0.7.0", "d3-array": "^3.2.4", "dateformat": "^5.0.3", - "discord.js": "14.11.0", + "discord.js": "^14.26.4", "ejs": "^3.1.10", "error-stack-parser": "^2.1.4", "execa": "^5.1.1", @@ -555,15 +555,15 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.10.0.tgz", - "integrity": "sha512-ikVZsZP+3shmVJ5S1oM+7SveUCK3L9fTyfA8aJ7uD9cNQlTqF+3Irbk2Y22KXTb3C3RNUahRkSInClJMkHrINg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.14.1.tgz", + "integrity": "sha512-gSKkhXLqs96TCzk66VZuHHl8z2bQMJFGwrXC0f33ngK+FLNau4hU1PYny3DNJfNdSH+gVMzE85/d5FQ2BpcNwQ==", "license": "Apache-2.0", "dependencies": { - "@discordjs/formatters": "^0.6.0", - "@discordjs/util": "^1.1.1", + "@discordjs/formatters": "^0.6.2", + "@discordjs/util": "^1.2.0", "@sapphire/shapeshift": "^4.0.0", - "discord-api-types": "^0.37.114", + "discord-api-types": "^0.38.40", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.4", "tslib": "^2.6.3" @@ -575,13 +575,22 @@ "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/builders/node_modules/@discordjs/formatters": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.6.0.tgz", - "integrity": "sha512-YIruKw4UILt/ivO4uISmrGq2GdMY6EkoTtD0oS0GvkJFRZbTSdPhzYiUILbJ/QslsvC9H9nTgGgnarnIl4jMfw==", + "node_modules/@discordjs/collection": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", + "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/formatters": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.6.2.tgz", + "integrity": "sha512-y4UPwWhH6vChKRkGdMB4odasUbHOUwy7KL+OVwF86PvT6QVOwElx+TiI1/6kcmcEe+g5YRXJFiXSXUdabqZOvQ==", "license": "Apache-2.0", "dependencies": { - "discord-api-types": "^0.37.114" + "discord-api-types": "^0.38.33" }, "engines": { "node": ">=16.11.0" @@ -590,11 +599,22 @@ "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/builders/node_modules/@discordjs/util": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.1.tgz", - "integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==", + "node_modules/@discordjs/rest": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.6.1.tgz", + "integrity": "sha512-wwQdgjeaoYFiaG+atbqx6aJDpqW7JHAo0HrQkBTbYzM3/PJ3GweQIpgElNcGZ26DCUOXMyawYd0YF7vtr+fZXg==", "license": "Apache-2.0", + "dependencies": { + "@discordjs/collection": "^2.1.1", + "@discordjs/util": "^1.2.0", + "@sapphire/async-queue": "^1.5.3", + "@sapphire/snowflake": "^3.5.5", + "@vladfrangu/async_event_emitter": "^2.4.6", + "discord-api-types": "^0.38.40", + "magic-bytes.js": "^1.13.0", + "tslib": "^2.6.3", + "undici": "6.24.1" + }, "engines": { "node": ">=18" }, @@ -602,79 +622,76 @@ "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/collection": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", - "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", + "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", + "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", "license": "Apache-2.0", "engines": { - "node": ">=16.11.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/formatters": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.3.tgz", - "integrity": "sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==", - "license": "Apache-2.0", - "dependencies": { - "discord-api-types": "0.37.61" - }, + "node_modules/@discordjs/rest/node_modules/@sapphire/snowflake": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.5.tgz", + "integrity": "sha512-xzvBr1Q1c4lCe7i6sRnrofxeO1QTP/LKQ6A6qy0iB4x5yfiSfARMEQEghojzTNALDTcv8En04qYNIco9/K9eZQ==", + "license": "MIT", "engines": { - "node": ">=16.11.0" + "node": ">=v14.0.0", + "npm": ">=7.0.0" } }, - "node_modules/@discordjs/formatters/node_modules/discord-api-types": { - "version": "0.37.61", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz", - "integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==", - "license": "MIT" - }, - "node_modules/@discordjs/rest": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.7.1.tgz", - "integrity": "sha512-Ofa9UqT0U45G/eX86cURQnX7gzOJLG2oC28VhIk/G6IliYgQF7jFByBJEykPSHE4MxPhqCleYvmsrtfKh1nYmQ==", + "node_modules/@discordjs/util": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.2.0.tgz", + "integrity": "sha512-3LKP7F2+atl9vJFhaBjn4nOaSWahZ/yWjOvA4e5pnXkt2qyXRCHLxoBQy81GFtLGCq7K9lPm9R517M1U+/90Qg==", "license": "Apache-2.0", "dependencies": { - "@discordjs/collection": "^1.5.1", - "@discordjs/util": "^0.3.0", - "@sapphire/async-queue": "^1.5.0", - "@sapphire/snowflake": "^3.4.2", - "discord-api-types": "^0.37.41", - "file-type": "^18.3.0", - "tslib": "^2.5.0", - "undici": "^5.22.0" + "discord-api-types": "^0.38.33" }, "engines": { - "node": ">=16.9.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/util": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.3.1.tgz", - "integrity": "sha512-HxXKYKg7vohx2/OupUN/4Sd02Ev3PBJ5q0gtjdcvXb0ErCva8jNHWfe/v5sU3UKjIB/uxOhc+TDOnhqffj9pRA==", + "node_modules/@discordjs/ws": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.2.3.tgz", + "integrity": "sha512-wPlQDxEmlDg5IxhJPuxXr3Vy9AjYq5xCvFWGJyD7w7Np8ZGu+Mc+97LCoEc/+AYCo2IDpKioiH0/c/mj5ZR9Uw==", "license": "Apache-2.0", + "dependencies": { + "@discordjs/collection": "^2.1.0", + "@discordjs/rest": "^2.5.1", + "@discordjs/util": "^1.1.0", + "@sapphire/async-queue": "^1.5.2", + "@types/ws": "^8.5.10", + "@vladfrangu/async_event_emitter": "^2.2.4", + "discord-api-types": "^0.38.1", + "tslib": "^2.6.2", + "ws": "^8.17.0" + }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/ws": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-0.8.3.tgz", - "integrity": "sha512-hcYtppanjHecbdNyCKQNH2I4RP9UrphDgmRgLYrATEQF1oo4sYSve7ZmGsBEXSzH72MO2tBPdWSThunbxUVk0g==", + "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", + "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", "license": "Apache-2.0", - "dependencies": { - "@discordjs/collection": "^1.5.1", - "@discordjs/rest": "^1.7.1", - "@discordjs/util": "^0.3.1", - "@sapphire/async-queue": "^1.5.0", - "@types/ws": "^8.5.4", - "@vladfrangu/async_event_emitter": "^2.2.1", - "discord-api-types": "^0.37.41", - "tslib": "^2.5.0", - "ws": "^8.13.0" - }, "engines": { - "node": ">=16.9.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@dnd-kit/accessibility": { @@ -1461,15 +1478,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "license": "MIT", - "engines": { - "node": ">=14" - } - }, "node_modules/@floating-ui/core": { "version": "1.6.8", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", @@ -4349,9 +4357,9 @@ } }, "node_modules/@sapphire/snowflake": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.5.tgz", - "integrity": "sha512-xzvBr1Q1c4lCe7i6sRnrofxeO1QTP/LKQ6A6qy0iB4x5yfiSfARMEQEghojzTNALDTcv8En04qYNIco9/K9eZQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz", + "integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==", "license": "MIT", "engines": { "node": ">=v14.0.0", @@ -4749,12 +4757,6 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", - "license": "MIT" - }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", @@ -5583,9 +5585,9 @@ "license": "MIT" }, "node_modules/@types/ws": { - "version": "8.5.13", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", - "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", "license": "MIT", "dependencies": { "@types/node": "*" @@ -5930,9 +5932,9 @@ } }, "node_modules/@vladfrangu/async_event_emitter": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.6.tgz", - "integrity": "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==", + "version": "2.4.7", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.7.tgz", + "integrity": "sha512-Xfe6rpCTxSxfbswi/W/Pz7zp1WWSNn4A0eW4mLkQUewCrXXtMj31lCg+iQyTkh/CkusZSq9eDflu7tjEDXUY6g==", "license": "MIT", "engines": { "node": ">=v14.0.0", @@ -7940,34 +7942,39 @@ "license": "Apache-2.0" }, "node_modules/discord-api-types": { - "version": "0.37.115", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.115.tgz", - "integrity": "sha512-ivPnJotSMrXW8HLjFu+0iCVs8zP6KSliMelhr7HgcB2ki1QzpORkb26m71l1pzSnnGfm7gb5n/VtRTtpw8kXFA==", - "license": "MIT" + "version": "0.38.48", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.38.48.tgz", + "integrity": "sha512-WFUE/2o0lBlLeCQonQ+Pu2RqHAqbytBJ2RlXR91gzk05InSS6k9ShzzLYoymrA4c2oRgRKGE7/VqQJNNdGWSxQ==", + "license": "MIT", + "workspaces": [ + "scripts/actions/documentation" + ] }, "node_modules/discord.js": { - "version": "14.11.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.11.0.tgz", - "integrity": "sha512-CkueWYFQ28U38YPR8HgsBR/QT35oPpMbEsTNM30Fs8loBIhnA4s70AwQEoy6JvLcpWWJO7GY0y2BUzZmuBMepQ==", + "version": "14.26.4", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.26.4.tgz", + "integrity": "sha512-4oBp8tc6Kf8IDBwAHhbsMaAqx1b5fob9SNasZT7V6yyyUydoO5i5fGuX7TmvRtR+q/WgKRnRViRoAWnG7fNyvA==", "license": "Apache-2.0", "dependencies": { - "@discordjs/builders": "^1.6.3", - "@discordjs/collection": "^1.5.1", - "@discordjs/formatters": "^0.3.1", - "@discordjs/rest": "^1.7.1", - "@discordjs/util": "^0.3.1", - "@discordjs/ws": "^0.8.3", - "@sapphire/snowflake": "^3.4.2", - "@types/ws": "^8.5.4", - "discord-api-types": "^0.37.41", - "fast-deep-equal": "^3.1.3", - "lodash.snakecase": "^4.1.1", - "tslib": "^2.5.0", - "undici": "^5.22.0", - "ws": "^8.13.0" + "@discordjs/builders": "^1.14.1", + "@discordjs/collection": "1.5.3", + "@discordjs/formatters": "^0.6.2", + "@discordjs/rest": "^2.6.1", + "@discordjs/util": "^1.2.0", + "@discordjs/ws": "^1.2.3", + "@sapphire/snowflake": "3.5.3", + "discord-api-types": "^0.38.40", + "fast-deep-equal": "3.1.3", + "lodash.snakecase": "4.1.1", + "magic-bytes.js": "^1.13.0", + "tslib": "^2.6.3", + "undici": "6.24.1" }, "engines": { - "node": ">=16.9.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/dlv": { @@ -8838,23 +8845,6 @@ "node": ">=16.0.0" } }, - "node_modules/file-type": { - "version": "18.7.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.7.0.tgz", - "integrity": "sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw==", - "license": "MIT", - "dependencies": { - "readable-web-to-node-stream": "^3.0.2", - "strtok3": "^7.0.0", - "token-types": "^5.0.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" - } - }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -9624,6 +9614,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -10740,6 +10731,12 @@ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" } }, + "node_modules/magic-bytes.js": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.13.0.tgz", + "integrity": "sha512-afO2mnxW7GDTXMm5/AoN1WuOcdoKhtgXjIvHmobqTD1grNplhGdv3PFOyjCVmrnOZBIT/gD/koDKpYG+0mvHcg==", + "license": "MIT" + }, "node_modules/magic-string": { "version": "0.30.17", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", @@ -12697,19 +12694,6 @@ "node": ">= 14.16" } }, - "node_modules/peek-readable": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.3.1.tgz", - "integrity": "sha512-GVlENSDW6KHaXcd9zkZltB7tCLosKB/4Hg0fqBJkAoBgYG2Tn1xtMgXtSUuMU9AK/gCm/tTdT8mgAeF4YNeeqw==", - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -13350,6 +13334,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -13360,22 +13345,6 @@ "node": ">= 6" } }, - "node_modules/readable-web-to-node-stream": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", - "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", - "license": "MIT", - "dependencies": { - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -14428,6 +14397,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -14568,23 +14538,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strtok3": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.1.1.tgz", - "integrity": "sha512-mKX8HA/cdBqMKUr0MMZAFssCkIGoZeSCMXgnt79yKxNFguMLVFgRe6wB+fsL0NmoHDbeyZXczy7vEPSoo3rkzg==", - "license": "MIT", - "dependencies": { - "@tokenizer/token": "^0.3.0", - "peek-readable": "^5.1.3" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/style-to-object": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.8.tgz", @@ -14901,23 +14854,6 @@ "node": ">=0.6" } }, - "node_modules/token-types": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", - "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", - "license": "MIT", - "dependencies": { - "@tokenizer/token": "^0.3.0", - "ieee754": "^1.2.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/treeverse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", @@ -15093,15 +15029,12 @@ } }, "node_modules/undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz", + "integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==", "license": "MIT", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, "engines": { - "node": ">=14.0" + "node": ">=18.17" } }, "node_modules/undici-types": { @@ -16330,9 +16263,9 @@ } }, "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/resource/menu/client/cl_main_page.lua b/resource/menu/client/cl_main_page.lua index 5800948f1..c4d7323fd 100644 --- a/resource/menu/client/cl_main_page.lua +++ b/resource/menu/client/cl_main_page.lua @@ -58,6 +58,13 @@ end) RegisterSecureNuiCallback('tpToPlayer', function(data, cb) + local targetServerId = tonumber(data.id) + + -- check for self-teleport + if targetServerId == GetPlayerServerId(PlayerId()) then + return sendSnackbarMessage('error', 'nui_menu.player_modal.actions.interaction.notifications.teleport_yourself', true) + end + TriggerServerEvent('txsv:req:tpToPlayer', tonumber(data.id)) cb({}) end)