The completed version of our Discord Weather Bot project for Complete Node.js Developer: Zero to Mastery.
We recommend that you code along with us and use this only if you ever get stuck or you don't like to code along.
- Ensure you have Node.js installed.
- In the terminal, run:
npm install
- Sign up for a free Discord account, if you don't already have one.
- Create a Discord application for your bot and find your application/client ID.
- Create a Discord server to test your bot and find your server/guild ID.
- Invite the bot to your Discord server.
- Sign up for a free Weather API account and find your API key.
- Create a
.env
file in the root folder and populate it as below.
In your .env
file populate the following values:
DISCORD_TOKEN=
CLIENT_ID=
GUILD_ID=
WEATHER_API_KEY=
- For production, run:
npm start
- For development, run:
npm run dev