bot.http, the central rate-limit-aware REST client. All methods are async and must be awaited. From fetching a guild’s metadata to issuing bans and managing roles, every call is automatically header-spoofed and backed by the library’s bucket-level rate-limit manager, so you never have to think about 429 Too Many Requests responses yourself.
Guild Methods
fetch_guild
Retrieve the full guild object for a server your account is a member of.dict representing the Guild object.
edit_guild
Modify a guild’s settings. Your account must have the Manage Guild permission.The preferred locale code (e.g.
"en-US", "de") for the guild’s system messages and discovery listing.dict.
leave_guild
Leave a guild that your account is currently a member of.None on success.
fetch_guild_channels
Retrieve a list of all channels in a guild, including text channels, voice channels, categories, and any active threads.list[dict] of Channel objects.
fetch_guild_members
Fetch a paginated list of members in a guild. Requires the Guild Members privileged intent to be enabled on the application.Return members with IDs greater than this value. Use for pagination through large member lists.
list[dict] of GuildMember objects.
search_guild_members
Search for guild members whose username or nickname starts with a given query string.list[dict] of GuildMember objects whose usernames or nicknames match the query prefix.
join_guild
Join a guild using an invite code. This replicates the action of a user clicking an invite link.dict containing the invite and the guild you joined.
Moderation
kick
Remove a member from a guild. They can rejoin with an active invite.None on success.
ban
Permanently ban a member from a guild, optionally deleting their recent message history.None on success.
unban
Revoke an existing ban, allowing the user to rejoin with an active invite.None on success.
fetch_bans
Retrieve the full list of active bans in a guild.list[dict], each containing a reason string and a partial user object.
Roles
fetch_roles
Retrieve all roles defined in a guild, including@everyone.
list[dict] of Role objects, ordered by position.
create_role
Create a new role in a guild. Requires the Manage Roles permission.The role’s display color as a 24-bit integer (e.g.
0xFFD700 for gold). Defaults to 0 (no colour).A bitfield string representing the permissions to grant. Defaults to the guild’s
@everyone permissions.dict.
edit_role
Modify an existing role’s properties.dict.
delete_role
Permanently delete a role from a guild. Members who held that role lose it immediately.None on success.
Invites
fetch_invite
Look up information about an invite without consuming it (i.e. without joining the guild).dict containing metadata about the destination guild, channel, and inviter.
delete_invite
Revoke an invite, preventing anyone from using it to join the guild. Requires Manage Guild or Manage Channels permissions.None on success.