@takaro/modules 0.0.0-next.0da151e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/BuiltinModule.d.ts +62 -0
- package/dist/BuiltinModule.d.ts.map +1 -0
- package/dist/BuiltinModule.js +245 -0
- package/dist/BuiltinModule.js.map +1 -0
- package/dist/community-modules.json +21 -0
- package/dist/dto/base.d.ts +7 -0
- package/dist/dto/base.d.ts.map +1 -0
- package/dist/dto/base.js +28 -0
- package/dist/dto/base.js.map +1 -0
- package/dist/dto/discordEvents.d.ts +32 -0
- package/dist/dto/discordEvents.d.ts.map +1 -0
- package/dist/dto/discordEvents.js +92 -0
- package/dist/dto/discordEvents.js.map +1 -0
- package/dist/dto/gameEvents.d.ts +83 -0
- package/dist/dto/gameEvents.d.ts.map +1 -0
- package/dist/dto/gameEvents.js +205 -0
- package/dist/dto/gameEvents.js.map +1 -0
- package/dist/dto/index.d.ts +54 -0
- package/dist/dto/index.d.ts.map +1 -0
- package/dist/dto/index.js +18 -0
- package/dist/dto/index.js.map +1 -0
- package/dist/dto/takaroEvents.d.ts +276 -0
- package/dist/dto/takaroEvents.d.ts.map +1 -0
- package/dist/dto/takaroEvents.js +794 -0
- package/dist/dto/takaroEvents.js.map +1 -0
- package/dist/main.d.ts +5 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +35 -0
- package/dist/main.js.map +1 -0
- package/dist/modules/chatBridge/hooks/DiscordToGame.d.ts +2 -0
- package/dist/modules/chatBridge/hooks/DiscordToGame.d.ts.map +1 -0
- package/dist/modules/chatBridge/hooks/DiscordToGame.js +18 -0
- package/dist/modules/chatBridge/hooks/DiscordToGame.js.map +1 -0
- package/dist/modules/chatBridge/hooks/GameToDiscord.d.ts +2 -0
- package/dist/modules/chatBridge/hooks/GameToDiscord.d.ts.map +1 -0
- package/dist/modules/chatBridge/hooks/GameToDiscord.js +14 -0
- package/dist/modules/chatBridge/hooks/GameToDiscord.js.map +1 -0
- package/dist/modules/chatBridge/hooks/PlayerConnected.d.ts +2 -0
- package/dist/modules/chatBridge/hooks/PlayerConnected.d.ts.map +1 -0
- package/dist/modules/chatBridge/hooks/PlayerConnected.js +9 -0
- package/dist/modules/chatBridge/hooks/PlayerConnected.js.map +1 -0
- package/dist/modules/chatBridge/hooks/PlayerDisconnected.d.ts +2 -0
- package/dist/modules/chatBridge/hooks/PlayerDisconnected.d.ts.map +1 -0
- package/dist/modules/chatBridge/hooks/PlayerDisconnected.js +9 -0
- package/dist/modules/chatBridge/hooks/PlayerDisconnected.js.map +1 -0
- package/dist/modules/chatBridge/index.d.ts +5 -0
- package/dist/modules/chatBridge/index.d.ts.map +1 -0
- package/dist/modules/chatBridge/index.js +64 -0
- package/dist/modules/chatBridge/index.js.map +1 -0
- package/dist/modules/dailyRewards/commands/daily.d.ts +2 -0
- package/dist/modules/dailyRewards/commands/daily.d.ts.map +1 -0
- package/dist/modules/dailyRewards/commands/daily.js +103 -0
- package/dist/modules/dailyRewards/commands/daily.js.map +1 -0
- package/dist/modules/dailyRewards/commands/streak.d.ts +2 -0
- package/dist/modules/dailyRewards/commands/streak.d.ts.map +1 -0
- package/dist/modules/dailyRewards/commands/streak.js +34 -0
- package/dist/modules/dailyRewards/commands/streak.js.map +1 -0
- package/dist/modules/dailyRewards/commands/topstreak.d.ts +2 -0
- package/dist/modules/dailyRewards/commands/topstreak.d.ts.map +1 -0
- package/dist/modules/dailyRewards/commands/topstreak.js +44 -0
- package/dist/modules/dailyRewards/commands/topstreak.js.map +1 -0
- package/dist/modules/dailyRewards/functions/utils.d.ts +6 -0
- package/dist/modules/dailyRewards/functions/utils.d.ts.map +1 -0
- package/dist/modules/dailyRewards/functions/utils.js +32 -0
- package/dist/modules/dailyRewards/functions/utils.js.map +1 -0
- package/dist/modules/dailyRewards/hooks/dailyLoginCheck.d.ts +2 -0
- package/dist/modules/dailyRewards/hooks/dailyLoginCheck.d.ts.map +1 -0
- package/dist/modules/dailyRewards/hooks/dailyLoginCheck.js +19 -0
- package/dist/modules/dailyRewards/hooks/dailyLoginCheck.js.map +1 -0
- package/dist/modules/dailyRewards/index.d.ts +5 -0
- package/dist/modules/dailyRewards/index.d.ts.map +1 -0
- package/dist/modules/dailyRewards/index.js +127 -0
- package/dist/modules/dailyRewards/index.js.map +1 -0
- package/dist/modules/economyUtils/commands/balance.d.ts +2 -0
- package/dist/modules/economyUtils/commands/balance.d.ts.map +1 -0
- package/dist/modules/economyUtils/commands/balance.js +7 -0
- package/dist/modules/economyUtils/commands/balance.js.map +1 -0
- package/dist/modules/economyUtils/commands/claim.d.ts +2 -0
- package/dist/modules/economyUtils/commands/claim.d.ts.map +1 -0
- package/dist/modules/economyUtils/commands/claim.js +35 -0
- package/dist/modules/economyUtils/commands/claim.js.map +1 -0
- package/dist/modules/economyUtils/commands/confirmTransfer.d.ts +2 -0
- package/dist/modules/economyUtils/commands/confirmTransfer.d.ts.map +1 -0
- package/dist/modules/economyUtils/commands/confirmTransfer.js +38 -0
- package/dist/modules/economyUtils/commands/confirmTransfer.js.map +1 -0
- package/dist/modules/economyUtils/commands/grantCurrency.d.ts +2 -0
- package/dist/modules/economyUtils/commands/grantCurrency.d.ts.map +1 -0
- package/dist/modules/economyUtils/commands/grantCurrency.js +28 -0
- package/dist/modules/economyUtils/commands/grantCurrency.js.map +1 -0
- package/dist/modules/economyUtils/commands/revokeCurrency.d.ts +2 -0
- package/dist/modules/economyUtils/commands/revokeCurrency.d.ts.map +1 -0
- package/dist/modules/economyUtils/commands/revokeCurrency.js +28 -0
- package/dist/modules/economyUtils/commands/revokeCurrency.js.map +1 -0
- package/dist/modules/economyUtils/commands/shop.d.ts +2 -0
- package/dist/modules/economyUtils/commands/shop.d.ts.map +1 -0
- package/dist/modules/economyUtils/commands/shop.js +69 -0
- package/dist/modules/economyUtils/commands/shop.js.map +1 -0
- package/dist/modules/economyUtils/commands/topCurrency.d.ts +2 -0
- package/dist/modules/economyUtils/commands/topCurrency.d.ts.map +1 -0
- package/dist/modules/economyUtils/commands/topCurrency.js +22 -0
- package/dist/modules/economyUtils/commands/topCurrency.js.map +1 -0
- package/dist/modules/economyUtils/commands/transfer.d.ts +2 -0
- package/dist/modules/economyUtils/commands/transfer.d.ts.map +1 -0
- package/dist/modules/economyUtils/commands/transfer.js +55 -0
- package/dist/modules/economyUtils/commands/transfer.js.map +1 -0
- package/dist/modules/economyUtils/cronJobs/zombieKillReward.d.ts +2 -0
- package/dist/modules/economyUtils/cronJobs/zombieKillReward.d.ts.map +1 -0
- package/dist/modules/economyUtils/cronJobs/zombieKillReward.js +66 -0
- package/dist/modules/economyUtils/cronJobs/zombieKillReward.js.map +1 -0
- package/dist/modules/economyUtils/index.d.ts +5 -0
- package/dist/modules/economyUtils/index.d.ts.map +1 -0
- package/dist/modules/economyUtils/index.js +192 -0
- package/dist/modules/economyUtils/index.js.map +1 -0
- package/dist/modules/geoBlock/hooks/IPDetected.d.ts +2 -0
- package/dist/modules/geoBlock/hooks/IPDetected.d.ts.map +1 -0
- package/dist/modules/geoBlock/hooks/IPDetected.js +50 -0
- package/dist/modules/geoBlock/hooks/IPDetected.js.map +1 -0
- package/dist/modules/geoBlock/index.d.ts +9 -0
- package/dist/modules/geoBlock/index.d.ts.map +1 -0
- package/dist/modules/geoBlock/index.js +329 -0
- package/dist/modules/geoBlock/index.js.map +1 -0
- package/dist/modules/gimme/commands/gimme.d.ts +2 -0
- package/dist/modules/gimme/commands/gimme.d.ts.map +1 -0
- package/dist/modules/gimme/commands/gimme.js +25 -0
- package/dist/modules/gimme/commands/gimme.js.map +1 -0
- package/dist/modules/gimme/index.d.ts +5 -0
- package/dist/modules/gimme/index.d.ts.map +1 -0
- package/dist/modules/gimme/index.js +75 -0
- package/dist/modules/gimme/index.js.map +1 -0
- package/dist/modules/highPingKicker/cronJobs/Ping check.d.ts +2 -0
- package/dist/modules/highPingKicker/cronJobs/Ping check.d.ts.map +1 -0
- package/dist/modules/highPingKicker/cronJobs/Ping check.js +59 -0
- package/dist/modules/highPingKicker/cronJobs/Ping check.js.map +1 -0
- package/dist/modules/highPingKicker/index.d.ts +5 -0
- package/dist/modules/highPingKicker/index.d.ts.map +1 -0
- package/dist/modules/highPingKicker/index.js +44 -0
- package/dist/modules/highPingKicker/index.js.map +1 -0
- package/dist/modules/lottery/commands/buyTicket.d.ts +2 -0
- package/dist/modules/lottery/commands/buyTicket.d.ts.map +1 -0
- package/dist/modules/lottery/commands/buyTicket.js +51 -0
- package/dist/modules/lottery/commands/buyTicket.js.map +1 -0
- package/dist/modules/lottery/commands/nextDraw.d.ts +2 -0
- package/dist/modules/lottery/commands/nextDraw.d.ts.map +1 -0
- package/dist/modules/lottery/commands/nextDraw.js +34 -0
- package/dist/modules/lottery/commands/nextDraw.js.map +1 -0
- package/dist/modules/lottery/commands/viewTickets.d.ts +2 -0
- package/dist/modules/lottery/commands/viewTickets.d.ts.map +1 -0
- package/dist/modules/lottery/commands/viewTickets.js +20 -0
- package/dist/modules/lottery/commands/viewTickets.js.map +1 -0
- package/dist/modules/lottery/cronJobs/drawLottery.d.ts +2 -0
- package/dist/modules/lottery/cronJobs/drawLottery.d.ts.map +1 -0
- package/dist/modules/lottery/cronJobs/drawLottery.js +96 -0
- package/dist/modules/lottery/cronJobs/drawLottery.js.map +1 -0
- package/dist/modules/lottery/index.d.ts +5 -0
- package/dist/modules/lottery/index.d.ts.map +1 -0
- package/dist/modules/lottery/index.js +85 -0
- package/dist/modules/lottery/index.js.map +1 -0
- package/dist/modules/playerOnboarding/commands/starterkit.d.ts +2 -0
- package/dist/modules/playerOnboarding/commands/starterkit.d.ts.map +1 -0
- package/dist/modules/playerOnboarding/commands/starterkit.js +47 -0
- package/dist/modules/playerOnboarding/commands/starterkit.js.map +1 -0
- package/dist/modules/playerOnboarding/hooks/playerConnected.d.ts +2 -0
- package/dist/modules/playerOnboarding/hooks/playerConnected.d.ts.map +1 -0
- package/dist/modules/playerOnboarding/hooks/playerConnected.js +11 -0
- package/dist/modules/playerOnboarding/hooks/playerConnected.js.map +1 -0
- package/dist/modules/playerOnboarding/index.d.ts +5 -0
- package/dist/modules/playerOnboarding/index.d.ts.map +1 -0
- package/dist/modules/playerOnboarding/index.js +83 -0
- package/dist/modules/playerOnboarding/index.js.map +1 -0
- package/dist/modules/serverMessages/cronJobs/Automated message.d.ts +2 -0
- package/dist/modules/serverMessages/cronJobs/Automated message.d.ts.map +1 -0
- package/dist/modules/serverMessages/cronJobs/Automated message.js +41 -0
- package/dist/modules/serverMessages/cronJobs/Automated message.js.map +1 -0
- package/dist/modules/serverMessages/index.d.ts +5 -0
- package/dist/modules/serverMessages/index.d.ts.map +1 -0
- package/dist/modules/serverMessages/index.js +45 -0
- package/dist/modules/serverMessages/index.js.map +1 -0
- package/dist/modules/teleports/commands/deletetp.d.ts +2 -0
- package/dist/modules/teleports/commands/deletetp.d.ts.map +1 -0
- package/dist/modules/teleports/commands/deletetp.js +20 -0
- package/dist/modules/teleports/commands/deletetp.js.map +1 -0
- package/dist/modules/teleports/commands/deletewaypoint.d.ts +2 -0
- package/dist/modules/teleports/commands/deletewaypoint.d.ts.map +1 -0
- package/dist/modules/teleports/commands/deletewaypoint.js +20 -0
- package/dist/modules/teleports/commands/deletewaypoint.js.map +1 -0
- package/dist/modules/teleports/commands/listwaypoints.d.ts +2 -0
- package/dist/modules/teleports/commands/listwaypoints.d.ts.map +1 -0
- package/dist/modules/teleports/commands/listwaypoints.js +17 -0
- package/dist/modules/teleports/commands/listwaypoints.js.map +1 -0
- package/dist/modules/teleports/commands/setprivate.d.ts +2 -0
- package/dist/modules/teleports/commands/setprivate.d.ts.map +1 -0
- package/dist/modules/teleports/commands/setprivate.js +29 -0
- package/dist/modules/teleports/commands/setprivate.js.map +1 -0
- package/dist/modules/teleports/commands/setpublic.d.ts +2 -0
- package/dist/modules/teleports/commands/setpublic.d.ts.map +1 -0
- package/dist/modules/teleports/commands/setpublic.js +45 -0
- package/dist/modules/teleports/commands/setpublic.js.map +1 -0
- package/dist/modules/teleports/commands/settp.d.ts +2 -0
- package/dist/modules/teleports/commands/settp.d.ts.map +1 -0
- package/dist/modules/teleports/commands/settp.js +40 -0
- package/dist/modules/teleports/commands/settp.js.map +1 -0
- package/dist/modules/teleports/commands/setwaypoint.d.ts +2 -0
- package/dist/modules/teleports/commands/setwaypoint.d.ts.map +1 -0
- package/dist/modules/teleports/commands/setwaypoint.js +28 -0
- package/dist/modules/teleports/commands/setwaypoint.js.map +1 -0
- package/dist/modules/teleports/commands/teleport.d.ts +2 -0
- package/dist/modules/teleports/commands/teleport.d.ts.map +1 -0
- package/dist/modules/teleports/commands/teleport.js +68 -0
- package/dist/modules/teleports/commands/teleport.js.map +1 -0
- package/dist/modules/teleports/commands/teleportwaypoint.d.ts +2 -0
- package/dist/modules/teleports/commands/teleportwaypoint.d.ts.map +1 -0
- package/dist/modules/teleports/commands/teleportwaypoint.js +43 -0
- package/dist/modules/teleports/commands/teleportwaypoint.js.map +1 -0
- package/dist/modules/teleports/commands/tplist.d.ts +2 -0
- package/dist/modules/teleports/commands/tplist.d.ts.map +1 -0
- package/dist/modules/teleports/commands/tplist.js +46 -0
- package/dist/modules/teleports/commands/tplist.js.map +1 -0
- package/dist/modules/teleports/cronJobs/Waypoint reconciler.d.ts +2 -0
- package/dist/modules/teleports/cronJobs/Waypoint reconciler.d.ts.map +1 -0
- package/dist/modules/teleports/cronJobs/Waypoint reconciler.js +6 -0
- package/dist/modules/teleports/cronJobs/Waypoint reconciler.js.map +1 -0
- package/dist/modules/teleports/functions/utils.d.ts +14 -0
- package/dist/modules/teleports/functions/utils.d.ts.map +1 -0
- package/dist/modules/teleports/functions/utils.js +156 -0
- package/dist/modules/teleports/functions/utils.js.map +1 -0
- package/dist/modules/teleports/index.d.ts +5 -0
- package/dist/modules/teleports/index.d.ts.map +1 -0
- package/dist/modules/teleports/index.js +208 -0
- package/dist/modules/teleports/index.js.map +1 -0
- package/dist/modules/timedShutdown/cronJobs/Shutdown.d.ts +2 -0
- package/dist/modules/timedShutdown/cronJobs/Shutdown.d.ts.map +1 -0
- package/dist/modules/timedShutdown/cronJobs/Shutdown.js +7 -0
- package/dist/modules/timedShutdown/cronJobs/Shutdown.js.map +1 -0
- package/dist/modules/timedShutdown/cronJobs/warning.d.ts +2 -0
- package/dist/modules/timedShutdown/cronJobs/warning.d.ts.map +1 -0
- package/dist/modules/timedShutdown/cronJobs/warning.js +10 -0
- package/dist/modules/timedShutdown/cronJobs/warning.js.map +1 -0
- package/dist/modules/timedShutdown/index.d.ts +5 -0
- package/dist/modules/timedShutdown/index.d.ts.map +1 -0
- package/dist/modules/timedShutdown/index.js +43 -0
- package/dist/modules/timedShutdown/index.js.map +1 -0
- package/dist/modules/utils/commands/help.d.ts +2 -0
- package/dist/modules/utils/commands/help.d.ts.map +1 -0
- package/dist/modules/utils/commands/help.js +84 -0
- package/dist/modules/utils/commands/help.js.map +1 -0
- package/dist/modules/utils/commands/ping.d.ts +2 -0
- package/dist/modules/utils/commands/ping.d.ts.map +1 -0
- package/dist/modules/utils/commands/ping.js +6 -0
- package/dist/modules/utils/commands/ping.js.map +1 -0
- package/dist/modules/utils/index.d.ts +5 -0
- package/dist/modules/utils/index.d.ts.map +1 -0
- package/dist/modules/utils/index.js +52 -0
- package/dist/modules/utils/index.js.map +1 -0
- package/dist/modules.json +757 -0
- package/package.json +17 -0
- package/scripts/buildBuiltinJson.ts +81 -0
- package/src/BuiltinModule.ts +159 -0
- package/src/__tests__/aliases.integration.test.ts +90 -0
- package/src/__tests__/bugRepros.integration.test.ts +485 -0
- package/src/__tests__/builtinmodule.unit.test.ts +15 -0
- package/src/__tests__/commandArgs.integration.test.ts +291 -0
- package/src/__tests__/crossServerPlayer.integration.test.ts +176 -0
- package/src/__tests__/economy/claim.integration.test.ts +250 -0
- package/src/__tests__/economy/economyUtils.integration.test.ts +495 -0
- package/src/__tests__/economy/shop.integration.test.ts +177 -0
- package/src/__tests__/economy/zombieKillReward.integration.test.ts +293 -0
- package/src/__tests__/geoblock.integration.test.ts +322 -0
- package/src/__tests__/gimme.integration.test.ts +106 -0
- package/src/__tests__/help.integration.test.ts +314 -0
- package/src/__tests__/highPingKicker.integration.test.ts +618 -0
- package/src/__tests__/lottery.integration.test.ts +344 -0
- package/src/__tests__/modulePermission.integration.test.ts +387 -0
- package/src/__tests__/onboarding.integration.test.ts +122 -0
- package/src/__tests__/ping.integration.test.ts +36 -0
- package/src/__tests__/roleExpiry.integration.test.ts +78 -0
- package/src/__tests__/serverMessages.integration.test.ts +116 -0
- package/src/__tests__/systemConfigCooldown.integration.test.ts +84 -0
- package/src/__tests__/systemConfigCost.integration.test.ts +194 -0
- package/src/__tests__/teleports/listtp.integration.test.ts +189 -0
- package/src/__tests__/teleports/publicteleports.integration.test.ts +345 -0
- package/src/__tests__/teleports/teleport.integration.test.ts +153 -0
- package/src/__tests__/teleports/tpManagement.integration.test.ts +175 -0
- package/src/__tests__/teleports/waypoints.integration.test.ts +832 -0
- package/src/community-modules/README.md +5 -0
- package/src/community-modules/modules/vote.json +19 -0
- package/src/dto/base.ts +13 -0
- package/src/dto/discordEvents.ts +69 -0
- package/src/dto/gameEvents.ts +159 -0
- package/src/dto/index.ts +25 -0
- package/src/dto/takaroEvents.ts +525 -0
- package/src/main.ts +47 -0
- package/src/modules/.eslintrc +5 -0
- package/src/modules/chatBridge/hooks/DiscordToGame.js +18 -0
- package/src/modules/chatBridge/hooks/GameToDiscord.js +18 -0
- package/src/modules/chatBridge/hooks/PlayerConnected.js +11 -0
- package/src/modules/chatBridge/hooks/PlayerDisconnected.js +11 -0
- package/src/modules/chatBridge/index.ts +64 -0
- package/src/modules/dailyRewards/commands/daily.js +114 -0
- package/src/modules/dailyRewards/commands/streak.js +42 -0
- package/src/modules/dailyRewards/commands/topstreak.js +54 -0
- package/src/modules/dailyRewards/functions/utils.js +36 -0
- package/src/modules/dailyRewards/hooks/dailyLoginCheck.js +24 -0
- package/src/modules/dailyRewards/index.ts +138 -0
- package/src/modules/economyUtils/commands/balance.js +8 -0
- package/src/modules/economyUtils/commands/claim.js +42 -0
- package/src/modules/economyUtils/commands/confirmTransfer.js +55 -0
- package/src/modules/economyUtils/commands/grantCurrency.js +34 -0
- package/src/modules/economyUtils/commands/revokeCurrency.js +34 -0
- package/src/modules/economyUtils/commands/shop.js +87 -0
- package/src/modules/economyUtils/commands/topCurrency.js +29 -0
- package/src/modules/economyUtils/commands/transfer.js +73 -0
- package/src/modules/economyUtils/cronJobs/zombieKillReward.js +82 -0
- package/src/modules/economyUtils/index.ts +197 -0
- package/src/modules/geoBlock/hooks/IPDetected.js +53 -0
- package/src/modules/geoBlock/index.ts +333 -0
- package/src/modules/gimme/commands/gimme.js +30 -0
- package/src/modules/gimme/index.ts +76 -0
- package/src/modules/highPingKicker/cronJobs/Ping check.js +68 -0
- package/src/modules/highPingKicker/index.ts +44 -0
- package/src/modules/lottery/commands/buyTicket.js +64 -0
- package/src/modules/lottery/commands/nextDraw.js +47 -0
- package/src/modules/lottery/commands/viewTickets.js +28 -0
- package/src/modules/lottery/cronJobs/drawLottery.js +124 -0
- package/src/modules/lottery/index.ts +86 -0
- package/src/modules/playerOnboarding/commands/starterkit.js +61 -0
- package/src/modules/playerOnboarding/hooks/playerConnected.js +14 -0
- package/src/modules/playerOnboarding/index.ts +86 -0
- package/src/modules/serverMessages/cronJobs/Automated message.js +47 -0
- package/src/modules/serverMessages/index.ts +46 -0
- package/src/modules/teleports/commands/deletetp.js +25 -0
- package/src/modules/teleports/commands/deletewaypoint.js +24 -0
- package/src/modules/teleports/commands/listwaypoints.js +23 -0
- package/src/modules/teleports/commands/setprivate.js +39 -0
- package/src/modules/teleports/commands/setpublic.js +60 -0
- package/src/modules/teleports/commands/settp.js +50 -0
- package/src/modules/teleports/commands/setwaypoint.js +31 -0
- package/src/modules/teleports/commands/teleport.js +84 -0
- package/src/modules/teleports/commands/teleportwaypoint.js +57 -0
- package/src/modules/teleports/commands/tplist.js +62 -0
- package/src/modules/teleports/cronJobs/Waypoint reconciler.js +7 -0
- package/src/modules/teleports/functions/utils.js +189 -0
- package/src/modules/teleports/index.ts +217 -0
- package/src/modules/timedShutdown/cronJobs/Shutdown.js +8 -0
- package/src/modules/timedShutdown/cronJobs/warning.js +13 -0
- package/src/modules/timedShutdown/index.ts +45 -0
- package/src/modules/utils/commands/help.js +100 -0
- package/src/modules/utils/commands/ping.js +7 -0
- package/src/modules/utils/index.ts +53 -0
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +9 -0
- package/typedoc.json +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shutdown.js","sourceRoot":"","sources":["../../../../src/modules/timedShutdown/cronJobs/Shutdown.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE/C,KAAK,UAAU,IAAI;IACjB,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAC9B,MAAM,MAAM,CAAC,UAAU,CAAC,4BAA4B,CAAC,YAAY,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.d.ts","sourceRoot":"","sources":["../../../../src/modules/timedShutdown/cronJobs/warning.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { data, takaro } from '@takaro/helpers';
|
|
2
|
+
async function main() {
|
|
3
|
+
const { gameServerId } = data;
|
|
4
|
+
const msg = data.module.userConfig.warningMessage;
|
|
5
|
+
await takaro.gameserver.gameServerControllerSendMessage(gameServerId, {
|
|
6
|
+
message: msg,
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
await main();
|
|
10
|
+
//# sourceMappingURL=warning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.js","sourceRoot":"","sources":["../../../../src/modules/timedShutdown/cronJobs/warning.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE/C,KAAK,UAAU,IAAI;IACjB,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAE9B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC;IAElD,MAAM,MAAM,CAAC,UAAU,CAAC,+BAA+B,CAAC,YAAY,EAAE;QACpE,OAAO,EAAE,GAAG;KACb,CAAC,CAAC;AACL,CAAC;AAED,MAAM,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/timedShutdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAsC,MAAM,wBAAwB,CAAC;AAE/F,qBAAa,aAAc,SAAQ,iBAAiB,CAAC,aAAa,CAAC;;CA0ClE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ModuleTransferDTO, ICronJob, ModuleTransferVersionDTO } from '../../BuiltinModule.js';
|
|
2
|
+
export class TimedShutdown extends ModuleTransferDTO {
|
|
3
|
+
constructor() {
|
|
4
|
+
super();
|
|
5
|
+
this.name = 'timedShutdown';
|
|
6
|
+
this.author = 'Takaro';
|
|
7
|
+
this.supportedGames = ['all'];
|
|
8
|
+
this.versions = [
|
|
9
|
+
new ModuleTransferVersionDTO({
|
|
10
|
+
tag: '0.0.1',
|
|
11
|
+
description: 'Automatically shut down the server at a specific time.',
|
|
12
|
+
configSchema: JSON.stringify({
|
|
13
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
warningMessage: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
title: 'Warning message',
|
|
19
|
+
description: 'Message to send to players before the server shuts down.',
|
|
20
|
+
default: 'Server is shutting down in 5 minutes!',
|
|
21
|
+
minLength: 1,
|
|
22
|
+
maxLength: 1024,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ['warningMessage'],
|
|
26
|
+
}),
|
|
27
|
+
cronJobs: [
|
|
28
|
+
new ICronJob({
|
|
29
|
+
name: 'Shutdown',
|
|
30
|
+
temporalValue: '30 3 * * *',
|
|
31
|
+
function: this.loadFn('cronJobs', 'Shutdown'),
|
|
32
|
+
}),
|
|
33
|
+
new ICronJob({
|
|
34
|
+
name: 'warning',
|
|
35
|
+
temporalValue: '25 3 * * *',
|
|
36
|
+
function: this.loadFn('cronJobs', 'warning'),
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
}),
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/timedShutdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAE/F,MAAM,OAAO,aAAc,SAAQ,iBAAgC;IACjE;QACE,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG;YACd,IAAI,wBAAwB,CAAC;gBAC3B,GAAG,EAAE,OAAO;gBACZ,WAAW,EAAE,wDAAwD;gBACrE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;oBAC3B,OAAO,EAAE,yCAAyC;oBAClD,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,cAAc,EAAE;4BACd,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,iBAAiB;4BACxB,WAAW,EAAE,0DAA0D;4BACvE,OAAO,EAAE,uCAAuC;4BAChD,SAAS,EAAE,CAAC;4BACZ,SAAS,EAAE,IAAI;yBAChB;qBACF;oBACD,QAAQ,EAAE,CAAC,gBAAgB,CAAC;iBAC7B,CAAC;gBAEF,QAAQ,EAAE;oBACR,IAAI,QAAQ,CAAC;wBACX,IAAI,EAAE,UAAU;wBAChB,aAAa,EAAE,YAAY;wBAC3B,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC;qBAC9C,CAAC;oBACF,IAAI,QAAQ,CAAC;wBACX,IAAI,EAAE,SAAS;wBACf,aAAa,EAAE,YAAY;wBAC3B,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC;qBAC7C,CAAC;iBACH;aACF,CAAC;SACH,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../../src/modules/utils/commands/help.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { data, takaro, TakaroUserError, checkPermission } from '@takaro/helpers';
|
|
2
|
+
async function main() {
|
|
3
|
+
const enabledModules = await takaro.module.moduleInstallationsControllerGetInstalledModules({
|
|
4
|
+
filters: { gameserverId: [data.gameServerId] },
|
|
5
|
+
});
|
|
6
|
+
const moduleCommands = await Promise.all(enabledModules.data.data.map(async (mod) => {
|
|
7
|
+
// Check if the module itself is enabled
|
|
8
|
+
if (!mod.systemConfig.enabled) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
const installedVersion = await takaro.module.moduleVersionControllerGetModuleVersion(mod.versionId);
|
|
12
|
+
const commands = installedVersion.data.data.commands;
|
|
13
|
+
// Filter out disabled commands
|
|
14
|
+
return commands.filter((command) => {
|
|
15
|
+
const commandConfig = mod.systemConfig.commands && mod.systemConfig.commands[command.name];
|
|
16
|
+
return commandConfig && commandConfig.enabled;
|
|
17
|
+
});
|
|
18
|
+
}));
|
|
19
|
+
const allCommandsFlat = moduleCommands.flat();
|
|
20
|
+
// Filter commands based on player permissions
|
|
21
|
+
const accessibleCommands = allCommandsFlat.filter((command) => {
|
|
22
|
+
// If command has no required permissions, it's accessible to all
|
|
23
|
+
if (!command.requiredPermissions || command.requiredPermissions.length === 0) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
// Check if player has all required permissions
|
|
27
|
+
return command.requiredPermissions.every((permission) => checkPermission(data.pog, permission));
|
|
28
|
+
});
|
|
29
|
+
if (data.arguments.command === 'search') {
|
|
30
|
+
// Check if a search term was actually provided (not the default 'none')
|
|
31
|
+
if (data.arguments.searchTerm === 'none') {
|
|
32
|
+
throw new TakaroUserError('Please provide a search term. Usage: /help search <term>');
|
|
33
|
+
}
|
|
34
|
+
// Search functionality
|
|
35
|
+
const searchTerm = data.arguments.searchTerm.toLowerCase();
|
|
36
|
+
const matchingCommands = accessibleCommands.filter((command) => {
|
|
37
|
+
// Check if command name contains search term
|
|
38
|
+
const nameMatch = command.name.toLowerCase().includes(searchTerm);
|
|
39
|
+
// Check if help text contains search term
|
|
40
|
+
const helpTextMatch = command.helpText.toLowerCase().includes(searchTerm);
|
|
41
|
+
return nameMatch || helpTextMatch;
|
|
42
|
+
});
|
|
43
|
+
if (matchingCommands.length === 0) {
|
|
44
|
+
await data.player.pm(`No commands found matching "${data.arguments.searchTerm}".`);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
await data.player.pm(`Commands matching "${data.arguments.searchTerm}":`);
|
|
48
|
+
await Promise.all(matchingCommands.map(async (command) => {
|
|
49
|
+
await data.player.pm(`${command.name}: ${command.helpText}`);
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else if (data.arguments.command === 'all') {
|
|
54
|
+
await data.player.pm('Available commands:');
|
|
55
|
+
if (accessibleCommands.length === 0) {
|
|
56
|
+
await data.player.pm('No commands available to you.');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
await Promise.all(accessibleCommands.map(async (command) => {
|
|
60
|
+
await data.player.pm(`${command.name}: ${command.helpText}`);
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
const requestedCommand = allCommandsFlat.find((c) => {
|
|
66
|
+
return c.name === data.arguments.command;
|
|
67
|
+
});
|
|
68
|
+
if (!requestedCommand) {
|
|
69
|
+
throw new TakaroUserError(`Unknown command "${data.arguments.command}", use this command without arguments to see all available commands.`);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
// Check if player has permission to use this command
|
|
73
|
+
const hasAccess = !requestedCommand.requiredPermissions ||
|
|
74
|
+
requestedCommand.requiredPermissions.length === 0 ||
|
|
75
|
+
requestedCommand.requiredPermissions.every((permission) => checkPermission(data.pog, permission));
|
|
76
|
+
if (!hasAccess) {
|
|
77
|
+
throw new TakaroUserError(`You don't have permission to use the "${data.arguments.command}" command.`);
|
|
78
|
+
}
|
|
79
|
+
await data.player.pm(`${requestedCommand.name}: ${requestedCommand.helpText}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
await main();
|
|
84
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../../src/modules/utils/commands/help.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjF,KAAK,UAAU,IAAI;IACjB,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,gDAAgD,CAAC;QAC1F,OAAO,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;KAC/C,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,GAAG,CACtC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAA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ACjF,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["../../../../src/modules/utils/commands/ping.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ping.js","sourceRoot":"","sources":["../../../../src/modules/utils/commands/ping.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAsC,MAAM,wBAAwB,CAAC;AAE/F,qBAAa,KAAM,SAAQ,iBAAiB,CAAC,KAAK,CAAC;;CAkDlD"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ModuleTransferDTO, ICommand, ModuleTransferVersionDTO } from '../../BuiltinModule.js';
|
|
2
|
+
export class Utils extends ModuleTransferDTO {
|
|
3
|
+
constructor() {
|
|
4
|
+
super();
|
|
5
|
+
this.name = 'utils';
|
|
6
|
+
this.author = 'Takaro';
|
|
7
|
+
this.supportedGames = ['all'];
|
|
8
|
+
this.versions = [
|
|
9
|
+
new ModuleTransferVersionDTO({
|
|
10
|
+
tag: '0.0.2',
|
|
11
|
+
description: 'A collection of useful commands',
|
|
12
|
+
configSchema: JSON.stringify({
|
|
13
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
14
|
+
type: 'object',
|
|
15
|
+
additionalProperties: false,
|
|
16
|
+
}),
|
|
17
|
+
commands: [
|
|
18
|
+
new ICommand({
|
|
19
|
+
function: this.loadFn('commands', 'ping'),
|
|
20
|
+
name: 'ping',
|
|
21
|
+
trigger: 'ping',
|
|
22
|
+
helpText: 'Replies with pong, useful for testing if the connection works.',
|
|
23
|
+
arguments: [],
|
|
24
|
+
}),
|
|
25
|
+
new ICommand({
|
|
26
|
+
function: this.loadFn('commands', 'help'),
|
|
27
|
+
name: 'help',
|
|
28
|
+
trigger: 'help',
|
|
29
|
+
helpText: 'The text you are reading right now, displays information about commands.',
|
|
30
|
+
arguments: [
|
|
31
|
+
{
|
|
32
|
+
name: 'command',
|
|
33
|
+
type: 'string',
|
|
34
|
+
defaultValue: 'all',
|
|
35
|
+
helpText: 'The command to get help for, or "search" to search for commands',
|
|
36
|
+
position: 0,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'searchTerm',
|
|
40
|
+
type: 'string',
|
|
41
|
+
defaultValue: 'none',
|
|
42
|
+
helpText: 'Search term to find commands (when first argument is "search")',
|
|
43
|
+
position: 1,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
}),
|
|
47
|
+
],
|
|
48
|
+
}),
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAE/F,MAAM,OAAO,KAAM,SAAQ,iBAAwB;IACjD;QACE,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG;YACd,IAAI,wBAAwB,CAAC;gBAC3B,GAAG,EAAE,OAAO;gB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