Gamebreaker - BinaryChop/ath-docs GitHub Wiki
Welcome to the ath-docs wiki!
C# changes:
- OnRemove() method was replaced by OnDestroy() in server side C# Module
- Mark Remove() method as deprecated and add Destroy() method for consistent alt:V api
Serverside changes:
rm import { PluginSystem } from "@AthenaServer/systems/plugins"; > add import * as Athena from '@AthenaServer/api'; rm Athena.systems.plugins.registerPlugin > add Athena.systems.plugins.registerPlugin(PLUGIN_NAME, onLoad); await AccountSystem.getAccount(player, 'discord', player.discord.id); >> await Athena.systems.account.getAccount('discord', player.discord.id);
await playerConst.set.account(player, account); >> await Athena.player.set.account(player, account); AgendaSystem.goNext(player, true); >> Athena.systems.loginFlow.register(player);
JS:
-
import * as myResource from "myResource" becomes import * as myResource from "alt:myResource"
-
The CommonJS File resolution has been disabled, this means if you want to import a file you now need to append the .js extension. If you want to import a folder you need to specify a file. Here you can see a small example: myFile needs to be replaced with myFile.js and mySubfolder with mySubfolder/index.js.