User
- class discord_limits.paths.UserPaths(client)
- Parameters:
client (discord_limits.DiscordClient) – The DiscordClient instance to use.
- async get_current_user()
Get the current user.
- Returns:
A user object.
- Return type:
ClientResponse
- async get_user(user_id)
Get a user.
- Parameters:
user_id (int) – The ID of the user to get.
- Returns:
A user object.
- Return type:
ClientResponse
- async edit_current_user(username)
Edit the current user.
- Parameters:
username (str) – The new username.
- Returns:
A user object.
- Return type:
ClientResponse
- async get_current_user_guilds(limit=200, before=None, after=None)
Get the current user’s guilds.
- Parameters:
limit (int, optional) – Max number of guilds to return (1-200), by default 200
before (int, optional) – Get guilds before this guild ID, by default None
after (int, optional) – Get guilds after this guild ID, by default None
- Returns:
A list of partial guild objects.
- Return type:
ClientResponse
- Raises:
InvalidParams – If the limit is not between 1 and 200.
- async get_current_user_guild_member(guild_id)
Get the current user’s guild member.
- Parameters:
guild_id (int) – The ID of the guild to get the member for.
- Returns:
A guild member object.
- Return type:
ClientResponse
- async leave_guild(guild_id)
Leave a guild.
- Parameters:
guild_id (int) – The ID of the guild to leave.
- Returns:
The response from Discord.
- Return type:
ClientResponse
- async create_DM(recipient_id)
Open a DM.
- Parameters:
recipient_id (int) – The ID of the user to open a DM with.
- Returns:
A DM channel object.
- Return type:
ClientResponse
- async create_group_DM(access_tokens, nicks=None)
Open a group DM.
- Parameters:
access_tokens (List[str]) – Access tokens of users that have granted your app the gdm.join scope
nicks (Dict[int, str], optional) – A dictionary of user ids to their respective nicknames, by default None
- Returns:
A DM channel object.
- Return type:
ClientResponse
- async get_connections()
Get the current user’s connections.
- Returns:
A list of connection objects.
- Return type:
ClientResponse