Code a Discord Bot with TypeScript - Host for Free in the Cloud
Vložit
- čas přidán 7. 08. 2024
- 📘New Course: Build full-stack React Typescript applications tsreact.maksimivanov.com/s/ytd
Learn how to code a Discord bot using TypeScript and host it for free in the cloud using Heroku.
Special thanks to Retool for sponsoring this video.
You can try Retool for free here: retool.com/
Course contents:
00:00 Intro
00:30 What we are building
02:10 Bot architecture overview
03:19 Create a NodeJS project
03:56 Set the NodeJS version for the project
04:31 Install the dependencies
06:39 Setup TypeScript
07:22 Set up TypeScript with hot reload
08:22 Set up a Git repo
09:03 Discord configuration
11:33 Load the configuration
13:03 Define the basic Discord bot
15:04 Register your first Discord bot command
17:38 Run your bot
17:59 Add support for multiple commands
20:15 Add the /help command
27:48 Set up Firebase Firestore
28:20 Connect your bot to Firebase
29:08 Save tickets in the Firestore
30:49 Create the bot admin panel
32:15 Connect Retool to Firebase
33:27 Fetch the tickets in the admin panel
34:39 Add the conversations window
37:28 Create the messages REST API
45:56 Deploy your Discord bot to Heroku
46:35 Connect admin panel to REST API
52:04 Test the bot manually
52:59 Outro
Follow me on Odysee:
odysee.com/$/invite/@stepbyst... - Věda a technologie
Retool looks like such a time saver! Thanks for sharing. 🙌
Wow, amazing video. Thanks alot! I will try to build this app tomorrow ^_^
Finally a new video! Awesome! 🤘
Yeah, i don't understand now how did i manage to publish a video a day for a month last summer 😬
I loved this video, it's perfect! Thank you!
Awesome fast paced tutorial 🔥🔥
Thank you so much for this video. It helped a lot on understanding discord.js
Hey, can we have a source code? Can't get my bot to work
Thanks for the video. What theme are you using?
when running the /help command the IDE doesn't throw any errors but the bot on discord says "The application did not respond" any tips?
Getting errors trying to build "deploy-commands.ts", the discordjs/rest package is broken and erroring.
node_modules/@discordjs/rest/dist/lib/RequestManager.d.ts:6:15 - error TS1005: ',' expected.
6 import { type BodyInit, type Dispatcher, Agent } from 'undici';
node_modules/@discordjs/rest/dist/lib/RequestManager.d.ts:6:30 - error TS1005: ',' expected.
6 import { type BodyInit, type Dispatcher, Agent } from 'undici';
These errors happen even when I only have it imported into the file. How do I fix?
1- Change the typescript version from packages.json to 4.7.4
2- then type In terminal (npm uninstall --location=global typescript)
3- then type (npm install --location=global typescript)
Think the discord library has been updated since then, so lots of changes :(
@@kirso if they are using v13 this code will totally work.
Although some minor things will need to be a tiny bit tweeked.
We need more of discord.ts bot
39:43 Ойойой)))
Максим, ты писал книгу по ТС?
Привет, да
@@satansdeer1 а где можно подробности узнать?)
@@Ushjsuuhensb А какие подробности, что интересно? Вот сама книга www.newline.co/fullstack-react-with-typescript
@@satansdeer1 спасибо )
@@satansdeer1 хорошая )
А на русском видео будут??
Вся документация и источники на английском. Учите английский 🙂