Skip to content

Commit

Permalink
fix: check for the key in the diff
Browse files Browse the repository at this point in the history
  • Loading branch information
onerandomusername committed Oct 18, 2022
1 parent 8b7cba2 commit 7c56b7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions disnake/ext/commands/interaction_bot_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def _app_commands_diff(
def _format_diff(diff: _Diff) -> str:
lines: List[str] = []
for key, label in _diff_map.items():
if key not in diff:
continue
lines.append(label)
if changes := diff[key]:
lines.extend(f" <{type(cmd).__name__} name={cmd.name!r}>" for cmd in changes)
Expand Down

0 comments on commit 7c56b7a

Please sign in to comment.