Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: TextEmbed not working #95

Open
kenyonbowers opened this issue Apr 29, 2024 · 1 comment
Open

bug: TextEmbed not working #95

kenyonbowers opened this issue Apr 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kenyonbowers
Copy link

kenyonbowers commented Apr 29, 2024

What happened?

My code is this:

const embed = new TextEmbed(new MessageEmbed({ title: "Too many verse references!", description: "There are too many verse references in your message." }))

Yet, I keep getting this error:

TypeError: Cannot read properties of undefined (reading 'icon_url')
    at new TextEmbed (D:\Repos\KJV-Bot-Revolt\node_modules\revolt.js\lib\cjs\classes\MessageEmbed.js:166:28)
    at Object.execute (D:\Repos\KJV-Bot-Revolt\src\events\client\messageCreate.js:14:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I have tried putting a value icon_url in the TextEmbed, and even gave a valid image url, yet it keeps giving me the exact same error. I also tried putting it as iconUrl to see if that worked, and it didn't.

@kenyonbowers kenyonbowers added the bug Something isn't working label Apr 29, 2024
@austinhuang0131
Copy link
Contributor

The icon_url needs to be in the initiator of MessageEmbed. See

this.iconUrl = embed.icon_url!;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 Untriaged
Development

No branches or pull requests

2 participants