discord.net - how to send link without embed

163 views Asked by At

I'm sending some text to discord using discord.net and c#:

var result = await client.SendMessageAsync(theText, false, Array.Empty<Embed>(), botname, imageUrl);

but I don't want any embed, and when the text contains a link an embed is automatically generated... How could I prevent that? using null or Array.Empty() doesn't prevent the embed to show up...

1

There are 1 answers

0
Julian On BEST ANSWER

There is nothing wrong with your code. As @Anu6is mentioned in the comments, discord automatically shows an embed if you post a link. You can either prevent this by removing the following permission in the channels (or for the role) for your bot:

enter image description here

or by wrapping it into <> for example: <https://google.com>