Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions topgg/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,17 @@ def discord_server(
) -> 'Metrics':
"""Creates a new Discord server metrics."""

if not (member_count or online_count) or not (
isinstance(member_count, int) or isinstance(online_count, int)
):
if (
(member_count is not None and not isinstance(member_count, int))
or (online_count is not None and not isinstance(online_count, int))
):
raise TypeError(
'The specified member count and/or online count must be an integer.'
)
elif member_count is None and online_count is None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix this indentation.

raise TypeError(
'The specified member count and/or online count must be an integer.'
)
raise TypeError(
'The specified member count and/or online count must be an integer.'
)
Expand Down