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

Doesn't send embeds #1

Closed
lqvers opened this issue May 8, 2023 · 2 comments
Closed

Doesn't send embeds #1

lqvers opened this issue May 8, 2023 · 2 comments

Comments

@lqvers
Copy link

lqvers commented May 8, 2023

I've added an embed field to my JSON body, however it doesn't send it for some reason.

My code:

import fetch from 'node-fetch';

const webhookUrl = process.env.webhook_url;
const payload = {
  content: "Insert your Message",
  username: "Your Username",
  avatar_url: "https://mdapublishers.web.app/icons/terminal_mini.png",
  embeds: [
    {
      title: 'Embed',
      description: 'Embed Description'
    }
  ]
};
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
};

fetch(webhookUrl, options)
  .then(res => {
    console.log(res.status);
  })
  .catch(err => {
    console.log(err);
  });

What sends in discord:

image

@MrDiscordAnimation
Copy link
Owner

Hello Iqvers.
I have mentioned the issue that you addressed in the README.md and it’s says this “This disforwarder is limited to only sending messages, changing the avatar of the webhook and nickname, so basically it can't send embeds or send attachments.”

@lqvers
Copy link
Author

lqvers commented May 9, 2023

Oh sorry i didnt see that

@MrDiscordAnimation MrDiscordAnimation pinned this issue Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants