You can get audit logs, members list with with info about them including when they joined the server and through which invite link, server insights(only for large servers above 500 members).
There are 2 types of discord apps, OAuth2 and a bot.
an OAuth2 app can get information about the user, his messages, server lists and their members.
a bot app can get information where it is installed, it can be users or servers, and get messages, logs, server members, invites, etc...
bot has much more options in term of access and can be installed to a server or a user and manage it if granted the needed authorization, while Oauth2 app can only access information and actions of a user.
Investigate the Discord API and bots