Série no YouTube · 10 episódios

discord.js with TypeScript

Crie um bot de Discord de verdade do zero com TypeScript e discord.js v14. Cada episódio tem o projeto completo como fica no fim do vídeo, pronto para navegar, copiar ou baixar. Os vídeos e o código estão em inglês.

Você vai precisar de

discord.js 14.28 · TypeScript 7 · tsx · Node.js 22.13+. Cada episódio é um projeto completo que continua o anterior.

Episódio 1Estreia em 7 de dezembro de 2026

Your First Discord Bot with TypeScript

  • Create the bot in the Discord Developer Portal and invite it with the right scopes.
  • Set up a Node 22 project with discord.js, TypeScript and tsx.
  • Keep the token safe in .env, then log in and set a custom status.

Disponível em 7 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 2Estreia em 9 de dezembro de 2026

Your First Slash Command

  • Register commands to your test server with REST and Routes.applicationGuildCommands.
  • Add CLIENT_ID and GUILD_ID, plus an npm run deploy script.
  • Answer /ping with the round trip and WebSocket latency.

Disponível em 9 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 3Estreia em 11 de dezembro de 2026

A Command Handler That Scales

  • A shared Command type, with one file per command checked by satisfies Command.
  • One Collection of commands used by both the bot and the deploy script.
  • An interaction handler that finds the command and catches errors. New: /server and /user.

Disponível em 11 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 4Estreia em 14 de dezembro de 2026

Slash Command Options, Choices & Autocomplete

  • /roll with integer choices plus min and max values.
  • /8ball with a required, length-capped text option.
  • /time with autocomplete over every Intl time zone.

Disponível em 14 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 5Estreia em 16 de dezembro de 2026

Embeds: /userinfo, /serverinfo & /avatar

  • Build rich replies with EmbedBuilder: author, thumbnail, fields and footer.
  • /userinfo and /serverinfo replace /user and /server, with Discord timestamps.
  • /avatar shows anyone's avatar in full size.

Disponível em 16 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 6Estreia em 18 de dezembro de 2026

Buttons: Build Rock Paper Scissors

  • Add a row of buttons with ActionRowBuilder and ButtonBuilder.
  • Wait for a click with awaitMessageComponent and a 30 second timeout.
  • Only the player who started the game can press its buttons.

Disponível em 18 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 7Estreia em 21 de dezembro de 2026

Select Menus & Modals

  • /roles posts a self-role select menu that keeps working after restarts.
  • Route the menu by its custom ID in the interaction handler.
  • /feedback opens a modal built with LabelBuilder and waits with awaitModalSubmit.

Disponível em 21 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 8Estreia em 23 de dezembro de 2026

Moderation Commands: /kick /ban /timeout /purge

  • Default member permissions and guild-only contexts decide who sees each command.
  • A shared checkTarget safety check for role hierarchy, the owner and the bot itself.
  • /kick, /ban, /timeout and /purge with audit log reasons.

Disponível em 23 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 9Estreia em 26 de dezembro de 2026

Cooldowns, Error Handling & deferReply

  • /weather calls the Open-Meteo API, using deferReply to beat the 3 second limit.
  • Per-command cooldowns with a friendly countdown.
  • Errors after a deferred reply are followed up instead of crashing the bot.

Disponível em 26 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Episódio 10Estreia em 28 de dezembro de 2026

Save Data with SQLite & Go Live with Docker

  • Store tags in SQLite with node:sqlite and prepared statements.
  • /tag with create, show, list and delete subcommands and autocomplete.
  • Deploy commands globally, compile with npm run build and ship it with Docker. 16 slash commands in all.

Disponível em 28 de dez.

O código é liberado quando o episódio vai ao ar, às 12:00 no horário do leste dos EUA.

Adicione o OblivionBot do Discord grátisAdicionar ao Discord