Skip to content

Commit

Permalink
Remove empty collections as well, because Discord does not allow empt…
Browse files Browse the repository at this point in the history
…y strings
  • Loading branch information
pandaninjas authored Dec 25, 2023
1 parent 31718fb commit acc198d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pypresence/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def remove_none(d: dict):
del d[item]
elif d[item] is None:
del d[item]
elif not len(d[item]):
del d[item]
return d


Expand Down

0 comments on commit acc198d

Please sign in to comment.