Discord member notification bot

Anyone knows how to program discord bot that notify me when a new member joins a random server ?
29 Replies
d.js toolkit
d.js toolkit2mo ago
Amgelo
Amgelo2mo ago
a random server? it can't be any random server, you can only listen for joins in servers the bot is in
Block
Block2mo ago
^ the guild has to be cached in the bots storage to be able to get any data from it you cannnot notify yourself when a user joins a server that the bot isnt in
dallas
dallas2mo ago
You could technically use the "identity" and "guilds" scopes in OAuth2 to request access to the users' guilds and their permissions in them. There are a few downsides to this: 1: (IMPORTANT) ⚠️ MUST COMPLY WITH DISCORD TOS ⚠️ Discord requires all user data to be stored securely using HTTPS and properly encrypted. Data must also be deleted by the user's request, or when OAuth access is revoked. You must have an explicitly written privacy policy if you plan on storing user data. Check TOS for more info on developer guidelines. 2: Does not have a WebSocket API (No live updates.) You would be required to fetch the data manually periodically. 3: Requires elevated permissions compared to a plain Discord bot. 4: Servers can possibly remove themselves from the data via privacy settings (not 100% sure)
Amgelo
Amgelo2mo ago
that's unrelated to the question though?
dallas
dallas2mo ago
How so?
Amgelo
Amgelo2mo ago
how does that solve their problem?
dallas
dallas2mo ago
You can update data from the guild list periodically to check for changes and alert the server if they join a server If by random he means any server other than the one the bot is in
Amgelo
Amgelo2mo ago
in their question the member isn't known though "a new member" basically a guildMemberAdd event that works in any server
dallas
dallas2mo ago
Ahhh, ok. That's a weird feature for a bot. He could still technically require new users to grant OAuth privileges before gaining channel access :shrug:
Amgelo
Amgelo2mo ago
yeah but they'd need to monitor manually when new people join, which would defeat the purpose or have some kind of event, which is the question btw I don't think your answer is against tos, sounds something common among bots
dallas
dallas2mo ago
Fair enough
Amgelo
Amgelo2mo ago
I say we leave it there though, the person never elaborated further and left :kek: I'll mark it as solved
dallas
dallas2mo ago
And displaying a users new servers is most definitely against TOS btw
Amgelo
Amgelo2mo ago
they're explicitly giving the application access to that data though or you mean showing it to anyone?
dallas
dallas2mo ago
If someone saw when i joined Anime Paradise 18+ I'd feel pretty violated
Amgelo
Amgelo2mo ago
yeah but you have to give the application access to that data, you agreed to it if the app then shows that to everyone without your permission then yeah that sounds against
dallas
dallas2mo ago
I still somehow doubt discord allows that lmaooo
Amgelo
Amgelo2mo ago
but just letting the app know that doesn't sound against it that's the purpose of the scope though :Thonk: to let the app know your servers
dallas
dallas2mo ago
It would definitely require a professionally written privacy policy by the app if they store data on their own servers Strange
Amgelo
Amgelo2mo ago
probably, but tbh if I let the app know my servers I'd just expect it's storing it that's more of a personal case though
dallas
dallas2mo ago
it's not just storing a server list tho It also stores an access token for the data which can be used by anybody if leaked
Amgelo
Amgelo2mo ago
that's just part of oauth though
dallas
dallas2mo ago
Well yeah it still gets stored on servers Wouldn't want a stranger to be able to see what servers im in any time without any trace
Amgelo
Amgelo2mo ago
only if they manage to get that token if you meant that sharing tokens is against tos then yeah I meant that an app reading your guilds and detecting when you join one, after you gave it the guilds scope, isn't
dallas
dallas2mo ago
you right Overanswered tf outta that question
Amgelo
Amgelo2mo ago
:kek: well anyways that was a good talk anyways to clarify stuff I'll just close whatever this question was, guess we'll never know
dallas
dallas2mo ago
I learned something lmao issue solved
d.js toolkit
d.js toolkit2mo ago
The issue has been marked as solved by support staff

Did you find this page helpful?