How to create a ts3 bot that crawls for UIDs

I want to create or have a ts3 bot that allows me to crawl UIDS from a server then store it in a database, then i would constantly do checks in my own server to see if there is any UIDs match. Something to somehow prevent spies in my own server... Is there anything like this? Where would i start to learn how to do it? Im web developer.

twitch instagram twitter facebook