[problem] using sendMessage(with emotes) via DiscordWebhookClient
See original GitHub issuei want to use external/internal emotes in webhook response but it doesnt work for all emotes , so it doesnt properly work for me.
i am calling emotes with (<:id:id>
) , so i dont know name but if i use this structure it works well when i replay to user via DiscordBot ; but in webhook responses only i see the text: :id: or :name:
even i call with name like (<:name:id>
) (bot has full permission)
here is my usage
e.Missions is an IEnumerable<Myclass>
ToWebhookEmbed
can convert to Embed
type
e.Missions.Select(p => p.ToWebhookEmbed()
returns to IEnumerable<Embed>
var wbhooks = await guild.GetWebhooksAsync(RequestOptions);
RestWebhook my_webhook = wbhooks.First();
DiscordWebhookClient wbClient = new DiscordWebhookClient(my_webhook );
wbClient.SendMessageAsync(string.Empty, false, e.Missions.Select(p => p.ToWebhookEmbed()), "bot name", "bot image").Wait();
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
[problem] using sendMessage(with emotes) via ...
i want to use external/internal emotes in webhook response but it doesnt work for all emotes , so it doesnt properly work for...
Read more >Recently Active 'discord.net' Questions
I am writing a discord bot using Discord.Net and C# and our server has many custom emotes in certain announcements. When I use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In order to use external emotes, the bot must be in that guild. Webhooks, though, can only use emotes in the server it’s in.
I know this is an old thread, but how is it possible that a javascript bot did EXACTLY what I and this guy needed? The bot straight up sent an emote from a different server USING A WEBHOOK. It searched its cache and sent what it found:
SOMEHOW a webhook message appeared, showing an emote, that isn’t on the server.
Edit: I’ve been working on this all day now and found out why and how. This thread shouldn’t be closed saying “it’s impossible”. It’s possible. The webhook can use anything that sending bot has, so the external emojis too. BUT it doesn’t use the bot’s permissions. It only has the permissions of the everyone role. So all you need to do is give that the perm to send external emojis.