Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing guild incident fields #9808

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Soheab
Copy link
Contributor

@Soheab Soheab commented Apr 27, 2024

Summary

These new fields were added to the docs PR:

  • dm_spam_detected_at
  • raid_detected_at

I'm not sure if the ..._detected methods are necessary...

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

discord/guild.py Outdated Show resolved Hide resolved
discord/guild.py Outdated Show resolved Hide resolved
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Copy link
Owner

@Rapptz Rapptz left a comment

Choose a reason for hiding this comment

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

This seems mostly fine, but minor bikeshedding nit: methods checking for boolean stuff tend to have the is_ prefix, e.g. is_timed_out() or is_on_mobile, etc.

@@ -4435,3 +4457,23 @@ def dms_paused(self) -> bool:
return False

return self.dms_paused_until > utils.utcnow()

def dm_spam_detected(self) -> bool:
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
def dm_spam_detected(self) -> bool:
def is_dm_spam_detected(self) -> bool:


return self.dm_spam_detected_at > utils.utcnow()

def raid_detected(self) -> bool:
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
def raid_detected(self) -> bool:
def is_raid_detected(self) -> bool:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants