C
C#2y ago
GNUGradyn

Cannot parse custom emoji string into Emoji object

Hi, I am trying to react with a custom emoji as shown below
await socketMessage.AddReactionAsync(Emoji.Parse(":Goatcutie:"));
await socketMessage.AddReactionAsync(Emoji.Parse(":Goatcutie:"));
I am getting the following error
System.FormatException: String is not emoji name or unicode!
at Discord.Emoji.Parse(String emojiStr)
at Goatbot.Modules.Goats.OnMessageAsync(SocketMessage socketMessage) in D:\code\Goatbot\GoatBot\Modules\Goats.cs:line 26
at Discord.EventExtensions.InvokeAsync[T](AsyncEvent`1 eventHandler, T arg)
at Discord.WebSocket.DiscordSocketClient.TimeoutWrap(String name, Func`1 action)
System.FormatException: String is not emoji name or unicode!
at Discord.Emoji.Parse(String emojiStr)
at Goatbot.Modules.Goats.OnMessageAsync(SocketMessage socketMessage) in D:\code\Goatbot\GoatBot\Modules\Goats.cs:line 26
at Discord.EventExtensions.InvokeAsync[T](AsyncEvent`1 eventHandler, T arg)
at Discord.WebSocket.DiscordSocketClient.TimeoutWrap(String name, Func`1 action)
just doing :Goatcutie: yields the same result. the bot is in the same server as the emoji
0 Replies
No replies yetBe the first to reply to this messageJoin