Discord.JS v13 - Embed Messages and Embed Command [Ep. 6]

Discord.JS v13 - Embed Messages and Embed Command [Ep. 6]

Worn Off Keys

2 года назад

43,560 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

That Is Broken!
That Is Broken! - 11.03.2022 15:58

Note setAuthor and setFooter method is depricared.

Should now be .setAuthor({name: 'bob'}) .setFooter({text: 'Hello World'})

Ответить
Random Alex
Random Alex - 18.02.2022 20:05

How do I delete duplicate slash commands?

Ответить
Random Alex
Random Alex - 18.02.2022 20:03

If you would like to keep your bot from crashing everytime you put invalid json in the args, you can simple add a try catch function, for example:
try{
const json = JSON.parse(text)

const embed = new MessageEmbed(json)

return embed
} catch (error) {
return 'Invalid JSON!'
}

Ответить
Ahinssu
Ahinssu - 25.12.2021 03:53

!embed works but /embed doesnt

Ответить
Ahinssu
Ahinssu - 25.12.2021 03:51

TypeError: Cannot read properties of undefined (reading 'reply') help

Ответить
Clipboard Channel
Clipboard Channel - 14.12.2021 21:33

I have a question, I saw in the video that Typescript isn't required, but can I use this with Node version 14?

Ответить
Pmm.
Pmm. - 12.11.2021 06:04

How to do in .JS plss

Ответить
SouProds
SouProds - 09.11.2021 02:15

tysm, this helped a lot!

Ответить
willhaven_
willhaven_ - 31.10.2021 12:08

When i create an embed from JSON in discord, everything works but the image or footer. have these features not been implemented yet?

Ответить
Srap Harutyunyan
Srap Harutyunyan - 19.10.2021 21:23

i dont really understand after "export default {}" part, how do we write that in js?

Ответить
zane !
zane ! - 10.10.2021 20:30

DiscordAPIError: Invalid Form Body
embeds[0].description: This field is required

This bot sends the embed perfectly for the first time but crashes upon using the command for the second time.

Ответить
Alex Ramirez
Alex Ramirez - 21.09.2021 12:07

I can edit the same embed from the "id" message?

Ответить
Quad404
Quad404 - 14.09.2021 06:46

Pls make more vids

Ответить
约京告白
约京告白 - 12.09.2021 17:32

hope enjoy! new classic export class:
import Discord from "discord.js";

export default class {
public commands: Discord.GuildApplicationCommandManager | Discord.ApplicationCommandManager | undefined;
public options: Options;
constructor(commands: Discord.GuildApplicationCommandManager | Discord.ApplicationCommandManager | undefined, options: Options) {
this.options = options;
this.commands = commands;
this.start();
}
private async start() {
let options = this.options;
for (const key in options.name) {
/**
* new LibCommands(commands, {
* name: ["ping"],
* description: ["return pong"]
* })
*/
this.commands?.create({
name: options.name[key],
description: options.description[key]
})
}
}
}

interface Options {
name: string[];
description: string[];
}

Ответить
Krumbit
Krumbit - 12.09.2021 01:57

I'd really love to see a tutorial on how to customize your own help embed. I've checked the source for WOKCommands and I still couldn't figure out how to make hidden commands not show up in the help menu.

Ответить
Dwain Dias
Dwain Dias - 09.09.2021 16:12

When running this on a VPS do we have to compile it into javascript or can we just run the file with "ts-node index.ts" on the VPS?

Ответить
Meguri
Meguri - 09.09.2021 03:55

I'm waiting for your embed button :D

Ответить
Samrudh Swaminathan
Samrudh Swaminathan - 09.09.2021 03:28

Can you please make a video on security systems for the bot? with anti-nuking , alt detection and captcha solving?

Ответить
xei
xei - 09.09.2021 00:33

great series

Ответить
Matrex
Matrex - 09.09.2021 00:20

How about making video about editing a message by id also every 5 seconds or any time also in presenceUpdate event or any other event except message or messageCreate

Ответить
Prismic Bros
Prismic Bros - 08.09.2021 21:20

Hey man, loving the video series.
Can you make a video about making a '!help' command that uses the category and description of each command?

Ответить
Aryan Ghildiyal
Aryan Ghildiyal - 08.09.2021 19:33

btw great series!!!

Ответить
Aryan Ghildiyal
Aryan Ghildiyal - 08.09.2021 19:33

why cant we just rewrite the strings in the fields of our first embed , instead of editing it ;-;
im a newbie so im just curious

Ответить
D. K.
D. K. - 08.09.2021 18:01

Nice.

Ответить
kiwi
kiwi - 08.09.2021 18:00

Notification brought me here, pog!

Ответить
The Droid
The Droid - 08.09.2021 18:00

First 🥇

Ответить