aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-04-25 09:55:07 -0400
committerRapptz <[email protected]>2021-05-27 00:53:13 -0400
commitcc56f31bcdb913577b2d6a3feb67ae534a27192d (patch)
tree8ce604bbd80be42bd7c58beaaa41357fafddc83d /discord
parentAdd initial support for buttons and components (diff)
downloaddiscord.py-cc56f31bcdb913577b2d6a3feb67ae534a27192d.tar.xz
discord.py-cc56f31bcdb913577b2d6a3feb67ae534a27192d.zip
Fix emoji not showing up in button component
Diffstat (limited to 'discord')
-rw-r--r--discord/components.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/components.py b/discord/components.py
index 714876a7..853ea1ed 100644
--- a/discord/components.py
+++ b/discord/components.py
@@ -143,9 +143,13 @@ class Button(Component):
}
if self.custom_id:
payload['custom_id'] = self.custom_id
+
if self.url:
payload['url'] = self.url
+ if self.emoji:
+ payload['emoji'] = self.emoji.to_dict()
+
return payload # type: ignore
def _component_factory(data: ComponentPayload) -> Component: