Skip to content

Commit 4dfda38

Browse files
fix: Fix _json parsing for non-existent Emoji argument (#538)
* fix: Fix _json parsing for non-existent Emoji arguments * ci: correct from checks. Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8db2fb5 commit 4dfda38

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- blank_issues_enabled: false
1+
blank_issues_enabled: false
22
contact_links:
33
- name: Discord server
44
url: https://discord.gg/KkgMBVuEkx

.github/ISSUE_TEMPLATE/report-bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ body:
3131
1. Import the module in Python.
3232
2. Create a client variable for the library.
3333
3. Try creating a slash command.
34-
4. See the traceback error given in the terminal or logger file.
34+
4. See the traceback error given in the terminal or logger file.
3535
validations:
3636
required: true
3737
- type: textarea

interactions/models/component.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def __init__(self, **kwargs):
4040
if self._json.get("emoji")
4141
else None
4242
)
43-
self._json.update({"emoji": self.emoji._json})
43+
if self.emoji:
44+
self._json.update({"emoji": self.emoji._json})
4445

4546

4647
class SelectMenu(DictSerializerMixin):

0 commit comments

Comments
 (0)