Discord Bot connection
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
I want to know something actually, Is there any way to create a discord bot with nextjs like connected and if I did something or change in the file send alert or no is this possible if its possible what should I use actually cause like I'm learning nextjs and more about it actually "I'm new"
What I meant: If there's any file changed in my files it will send alert not "commits" like "messages" saying the ${fileName} has been changed ssomething like that
What I meant: If there's any file changed in my files it will send alert not "commits" like "messages" saying the ${fileName} has been changed ssomething like that
7 Replies
@Transvaal lion I want to know something actually, Is there any way to create a discord bot with nextjs like connected and if I did something or change in the file send alert or no is this possible if its possible what should I use actually cause like I'm learning nextjs and more about it actually "I'm new"
What I meant: If there's any file changed in my files it will send alert not "commits" like "messages" saying the ${fileName} has been changed ssomething like that
Mugger Crocodile
Hello @Transvaal lion . Can you please more explain what do you mean? "Dashboard" or " Make discord by Next.js" i dont realy understant what do you mean if you explain more your question i can help you.. ")
1. here is my respond now : If you want build discord bot by next.js. Its not possible because next.js is Javascript framework builded on react and javascript i think. For build discord bot you can use Discord.js library or Discord.py ( Alternatives Nextcord ) its best libraries for building discord bots. If we want build bot by next.js we need library for it.
2. Respond : For commits you can easily use Github and you can setup it by yourself just google it on youtube or with bot maybe u can but you need program the bot in discord.js with the next.js and make logic that when u turn on local host its sends the filename and etc.. maybe i use webhook for this.
1. here is my respond now : If you want build discord bot by next.js. Its not possible because next.js is Javascript framework builded on react and javascript i think. For build discord bot you can use Discord.js library or Discord.py ( Alternatives Nextcord ) its best libraries for building discord bots. If we want build bot by next.js we need library for it.
2. Respond : For commits you can easily use Github and you can setup it by yourself just google it on youtube or with bot maybe u can but you need program the bot in discord.js with the next.js and make logic that when u turn on local host its sends the filename and etc.. maybe i use webhook for this.
@Transvaal lion Dashboard actually
Mugger Crocodile
Well, if you want to create a dashboard using the next.js framework, it is of course possible, it is not that complicated, you just need to decompose the projects well.
-> I would decompose the project into two workspaces I would do authentication using either some api like CLERK API or I would use the official discord Oauth Authentication using my application which you create on the discord developer portal then select the appropriate scopes. Further I would create my own Custom API which would communicate between Frontend and Backend and with the bot. I would have the database either on my source hosted locally with Postgres or via Supbase
-> I would decompose the project into two workspaces I would do authentication using either some api like CLERK API or I would use the official discord Oauth Authentication using my application which you create on the discord developer portal then select the appropriate scopes. Further I would create my own Custom API which would communicate between Frontend and Backend and with the bot. I would have the database either on my source hosted locally with Postgres or via Supbase
@Mugger Crocodile Well, if you want to create a dashboard using the next.js framework, it is of course possible, it is not that complicated, you just need to decompose the projects well.
-> I would decompose the project into two workspaces I would do authentication using either some api like CLERK API or I would use the official discord Oauth Authentication using my application which you create on the discord developer portal then select the appropriate scopes. Further I would create my own Custom API which would communicate between Frontend and Backend and with the bot. I would have the database either on my source hosted locally with Postgres or via Supbase
Transvaal lionOP
Thanks alot for the answer, I would actually use mongodb or MariaDB for the Database
And one morething should I do Whitelist for the API like only accept request from a spcefic Ip?
And one morething should I do Whitelist for the API like only accept request from a spcefic Ip?
@Transvaal lion Thanks alot for the answer, I would actually use mongodb or MariaDB for the Database
And one morething should I do Whitelist for the API like only accept request from a spcefic Ip?
Mugger Crocodile
Again, I don't know what context you mean. If we're talking about Preliminary Access you could solve this by enabling some specific IP addresses. Which is quite an unusual way, if I were to do a waitlist, I would choose scope email in discord's Oauth and allow only some email addresses to have access. the process then checks if the discord account has a given email address assigned to it, I think it's more convenient. But if you wanted to block specific IP addresses this is again not a good solution due to the fact that the user just needs to use the VPN service and will have a different IP address assigned to them. Now it depends what your context is. Yes u can make for this API or use already created API. In back-end you can create your elegant logic or use frameworks like NestJS or Express.js. But first you need understant the communication With Front-end and Back-end and if you dont have knowledge about API the frameworks is for nothing if you dont know how works the API.
@Mugger Crocodile Again, I don't know what context you mean. If we're talking about Preliminary Access you could solve this by enabling some specific IP addresses. Which is quite an unusual way, if I were to do a waitlist, I would choose scope email in discord's Oauth and allow only some email addresses to have access. the process then checks if the discord account has a given email address assigned to it, I think it's more convenient. But if you wanted to block specific IP addresses this is again not a good solution due to the fact that the user just needs to use the VPN service and will have a different IP address assigned to them. Now it depends what your context is. Yes u can make for this API or use already created API. In back-end you can create your elegant logic or use frameworks like NestJS or Express.js. But first you need understant the communication With Front-end and Back-end and if you dont have knowledge about API the frameworks is for nothing if you dont know how works the API.
Transvaal lionOP
Okay let me explain whitelist meaning
Whitelist meaning its actually means when i send a request i cannot cause my ip is not the same ip in the whitelist file that's what it means
Whitelist meaning its actually means when i send a request i cannot cause my ip is not the same ip in the whitelist file that's what it means
@Transvaal lion I want to know something actually, Is there any way to create a discord bot with nextjs like connected and if I did something or change in the file send alert or no is this possible if its possible what should I use actually cause like I'm learning nextjs and more about it actually "I'm new"
What I meant: If there's any file changed in my files it will send alert not "commits" like "messages" saying the ${fileName} has been changed ssomething like that
You can send messages as discord bot using api routes in server-side (eg. api route)