meze
meze
DIAdiscord.js - Imagine an app
Created by meze on 12/17/2023 in #djs-questions
How to check if Member Authorzied with OAuth2 Application?
Hey someone got the knowledge. I have a Embed message with a Button and the oauth2 authorzie link in it. How Can i implemend in the Code, that the Bot check if the User have it self authorized and give him a specific Role. My latest Code: https://pastebin.com/XGmBgH8n with the error Code:
const interactions = await client.application.commands.get('verify').interactions.fetch();
^

TypeError: client.application.commands.get is not a function
at Client.<anonymous> (C:\Users\mezep\Desktop\DevBot\bot.js:36:57)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.10.0
const interactions = await client.application.commands.get('verify').interactions.fetch();
^

TypeError: client.application.commands.get is not a function
at Client.<anonymous> (C:\Users\mezep\Desktop\DevBot\bot.js:36:57)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.10.0
I know the client.application.commands.get is the problem but I dont know, how to fix that rightly. Thanks for everybody help! :D
6 replies
DIAdiscord.js - Imagine an app
Created by meze on 12/17/2023 in #djs-questions
OAuth2 Question
Is it possible to take authorized User with the OAuth2 (guild.join), auto. joining a another server with a Command? And mabye if someone have time, can tell me how? :D
13 replies