A Discord Bot that retrieves Posts from AhNegao (https://www.ahnegao.com.br) to a Discord Channel 🤖
AhNegaoDiscordBot uses web scraping in order to fetch the posts of current day from https://www.ahnegao.com.br and then, if they were not posted yet on the selected discord channel, he does it.
- Typescript
- Cheerio
- DiscordJS
- NodeCron
-
Clone this repository.
-
Install all dependencies:
npm install
-
Create an application on Discord for Developers.
-
On the aside menu, go into the Bot, create a new bot and mark the option Public Bot.
-
On the aside menu, go into the OAuth2 option and mark the following options:
On SCOPES, mark: bot
On BOT PERMISSIONS, mark: Send Messages, Read Message History
-
Use the link below SCOPES to add the bot to your server.
-
On the aside menu, go into the Bot option and click on Copy in the side of your bot avatar to copy the bot token.
-
Go back to the repository you cloned on your machine, duplicate the .env.example into a .env file and fill the required variables:
DISCORD_BOT_TOKEN=
DISCORD_CHANNEL_NAME=
- Run the application:
npm run dev