Skip to content

User Resource

Note

The following classes come from the scurrypy.resources.user module.


User dataclass

Bases: BaseResource

A Discord user.

context: Any instance-attribute

Associated user data.

fetch async

Fetch this user by ID.

Parameters:

  • user_id (int) –

    ID of user to fetch

Returns:

fetch_guild_member async

Fetch this user's guild member data.

Parameters:

  • guild_id (int) –

    ID of guild to fetch data from

  • user_id (int) –

    ID of user to fetch

Returns:

modify_current_user async

Modify the bot's account settings. Fires UserUpdateEvent.

Parameters:

Returns:

leave_guild async

Make the bot leave a guild. Fires GuildDeleteEvent and GuildMemberRemoveEvent.

Parameters:

  • guild_id (int) –

    ID of the guild to leave

create_dm async

Create a DM between the bot and this user.

Parameters:

  • user_id (int) –

    ID of user to create DM with

Returns: