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...
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:
or by wrapping it into
<>for example:<https://google.com>