Skip to content

hereticerik/typscript-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

typscript-discord-bot

A very simple discord bot written in typescript

To run this code, you will need to install the following dependencies and follow these steps:

axios discord.js dotenv googleapis

You can install them by running the following command in your terminal:

npm install axios discord.js dotenv googleapis

Once you have installed the required packages, you can run the code by running the following command in your terminal:

npm start

Note that you will need to have your own Discord bot token and API keys for OpenWeatherMap and YouTube Data API. You can get them by creating accounts on the respective websites and following their instructions to generate API keys. Once you have your API keys, create a .env file in the root directory of your project and add the following lines to it:

DISCORD_TOKEN=your_discord_bot_token_here
OPENWEATHER_API_KEY=your_openweathermap_api_key_here
YOUTUBE_API_KEY=your_youtube_data_api_key_here

Replace your_discord_bot_token_here, your_openweathermap_api_key_here, and your_youtube_data_api_key_here with your actual API keys. Then save the file and you should be able to run the bot successfully.

Your bot should now be online and ready to use. You can invite it to your Discord server by generating an invite link using the Discord Developer Portal.

This Discord Bot was made for Educational Purposes as an Example