It usually is illegal to hack discord accounts. It is possible to hack a Discord account with a modified version of the app without being detected by the servers.