Closed edelkas closed 10 months ago
@edelkas great job finding a fix so quickly, you should submit a pr for this
Ah, this is why. Does anyone know whether there's a fix that doesn't involve messing with the Discordrb code?
Can we please roll this into a new release...I ran into this issue today.
Can we please roll this into a new release...I ran into this issue today.
It's fixed in the main branch, so if you're using bundler you should be able to add something like this to your Gemfile:
gem 'discordrb', '~> 3.5', git: 'https://github.com/shardlab/discordrb', branch: 'main'
Yeah, that's what I ended up doing (Although I pinned it at a certain commit). Just annoying is all.
4 months in limbo, and the events api sadly still not merged in. Made development and learning rails fun for me :(
Description:
Starting today, buttons and string select options without explicit emojis are failing, returning the following error:
The issue appears to be that
{}
is no longer accepted as a default value for the emoji field, instead requiring an explicitnull
value.Solution:
An easy tested fix is just to add the extra case
in the button builder: https://github.com/shardlab/discordrb/blob/0f01116c3326e4784a0b581326307f5a2b57427a/lib/discordrb/webhooks/view.rb#L48-L53 The same fix works for string select options here: https://github.com/shardlab/discordrb/blob/0f01116c3326e4784a0b581326307f5a2b57427a/lib/discordrb/webhooks/view.rb#L148-L153