Skip to content

feat: Members Search #9912

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

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a5bc854
Added member safety search information
DA-344 Jan 8, 2024
3c5c1dd
Merge branch 'Rapptz:master' into members-search
DA-344 Jan 8, 2024
69be2f1
Fixed Member Safety Information returning None
DA-344 Jan 8, 2024
62dd6d2
Merge branch 'members-search' of https://github.com/DA-344/d.py into …
DA-344 Jan 8, 2024
99e6422
Changed the docstring to show proper permissions
DA-344 Jan 9, 2024
1acdffb
Updated some things
DA-344 Mar 17, 2024
e93f09e
Merge from https://github.com/Rapptz/discord.py
DA-344 Mar 17, 2024
5ad1684
Added source invite filters
DA-344 Mar 20, 2024
4a60981
Updated filters table in Guild.fetch_members_safety_information
DA-344 Mar 20, 2024
dababbd
Merge branch 'master' of https://github.com/Rapptz/discord.py into me…
DA-344 Apr 21, 2024
fca336c
Rewritten MemberSearch
DA-344 Apr 21, 2024
6a1c222
fetch_members_safety_information -> fetch_safety_information
DA-344 Apr 21, 2024
39435d8
Edited get_guild_member_safety
DA-344 Apr 21, 2024
50a5357
Added newline (pyright)
DA-344 Apr 21, 2024
7f6f40f
More newlines
DA-344 Apr 21, 2024
b8eca36
Reworked get_guild_member_safety
DA-344 Apr 21, 2024
4a6e0c6
fetch_safety_information | Return Type: Tuple -> AsyncIterator
DA-344 Apr 21, 2024
2468563
Updated fetch_safety_information docstring
DA-344 Apr 21, 2024
0457947
Added support for username search
DA-344 Apr 21, 2024
abae9a6
Changes to fetch_safety_information
DA-344 Apr 21, 2024
2898271
Rewrite get_guild_safety
DA-344 May 12, 2024
79b51a4
Merge master from https://github.com/Rapptz/discord.py
DA-344 May 12, 2024
3665d27
pog
DA-344 May 29, 2024
c2f4775
Merge branch master from https://github.com/Rapptz/discord.py
DA-344 May 29, 2024
450eaf9
Some changes
DA-344 Jul 28, 2024
6fff459
Docs things
DA-344 Jul 28, 2024
07faeec
Merge master to members-search
DA-344 Aug 7, 2024
210d5a1
Update members-search + first docs commit
DA-344 Aug 9, 2024
0939916
Bump version to 2.5 + document MemberSearch attributes
DA-344 Aug 9, 2024
e366bca
Remove unneccessary imports and type: ignore
DA-344 Aug 9, 2024
498fc88
Black
DA-344 Aug 9, 2024
b625356
fix docs references
DA-344 Aug 9, 2024
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
Prev Previous commit
Next Next commit
Bump version to 2.5 + document MemberSearch attributes
  • Loading branch information
DA-344 committed Aug 9, 2024
commit 09399166b7c9358c73be4849277e14d25b22bdbe
2 changes: 1 addition & 1 deletion discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
Optional,
TYPE_CHECKING,
Tuple,
TypedDict,

Check failure on line 47 in discord/guild.py

View workflow job for this annotation

GitHub Actions / check 3.x

Import "TypedDict" is not accessed (reportUnusedImport)
Union,
overload,
)
Expand Down Expand Up @@ -107,7 +107,7 @@
MISSING = utils.MISSING

if TYPE_CHECKING:
from typing_extensions import Unpack

Check failure on line 110 in discord/guild.py

View workflow job for this annotation

GitHub Actions / check 3.x

Import "Unpack" is not accessed (reportUnusedImport)

from .abc import Snowflake, SnowflakeTime
from .types.guild import (
Expand Down Expand Up @@ -4417,7 +4417,7 @@

You must have :attr:`Permissions.manage_guild` to do this.

.. versionadded:: 2.4
.. versionadded:: 2.5

Parameters
----------
Expand Down
8 changes: 6 additions & 2 deletions discord/member.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,18 @@
class MemberSearch:
"""Represents a fetched member from member search.

.. versionadded:: 2.4
.. versionadded:: 2.5

Attributes
----------
resolved: :class:`Member`
The resolved member of this search result.
invite_code: Optional[:class:`str`]
The Invite Code this user joined with.
join_type: :class:`JoinType`
The join type.
inviter_id: Optional[:class:`int`]
The ID of the user that invited this member to the guild, if available.
"""

__slots__ = (
Expand All @@ -280,7 +284,7 @@
self.invite_code: Optional[str] = data.get('source_invite_code')
self.join_type: MemberJoinType = try_enum(MemberJoinType, data['join_source_type'])
try:
self.inviter_id = int(data['inviter_id'])

Check failure on line 287 in discord/member.py

View workflow job for this annotation

GitHub Actions / check 3.x

Argument of type "Snowflake | None" cannot be assigned to parameter "__x" of type "ConvertibleToInt" in function "__new__" (reportArgumentType)
except KeyError:
self.inviter_id = None

Expand Down Expand Up @@ -1131,7 +1135,7 @@

You must have :attr:`Permissions.manage_guild` to do this.

.. versionadded:: 2.4
.. versionadded:: 2.5

Raises
------
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy