# Link accounts to tickets
This is basically a summary for a bot that would link accounts to tickets and on logout/when requested send progress
## Linking the account
This would be done through a `!link <username>` command or something similar in the ticket. Would basically just link the account name and the ticket id in whatver db you're using.
## Checking for the worker logging in and out
Hiscores update everytime someone logs out of the account, could run a request every 15 minutes or something along those lines to check if the account's xp has changed, if you wanna do this through crystal math labs api or hiscores is up to you. If you want to do this through hiscores api theres this: https://pypi.org/project/OSRS-Hiscores/ which is pretty nice.
Once the check is done and the worker has logged out send a message in a logging channel with an embed or something:
```
Worker just logged out at x:xx PM/AM
Here's the xp gained since the last time they logged out at x:xx AM/PM:
Runecraft: 40k XP gained
... etc
```
This could also be requested at anytime using a `!check` command, and it'd output the last time the worker logged out and if there's been any XP differences since then.