Its a slack bot, I have never used Slack API before so why not now?
Its a slack bot, I have never used Slack API before so why not now?
Now, i got to know that i need to add some scopes before my bot can be coded so i added like chat:write and commands.
I also installed @slack/bolt module. Looks like it is the main thing and i dont need to send api requests again and again
I installed the bot in hack-club, now i got the bot token and added it in env.
Imported App class from slack lib and made a new App which i put the env variales into.
the guide said that i had to create a function and execute the server for bot to run on
and created it and hosted on port 3000.
Now I had successfully run the server but now the bot needed to connect to me so we enabled a thing called socket mode and changed a code a little bit also added a app_token with 2 scopes.
ANd now i ran the code to see what happen.
Log in to leave a comment