bot.http, a managed HTTP client that sits between your code and Discord’s REST API. All methods are async, so you must await them. The client handles rate-limit buckets automatically: when Discord tells it to back off, it waits and retries without raising an error in your code. Every request is sent with accurate browser-style headers so the selfbot traffic looks indistinguishable from a normal client session.
send_message
Send a message to any text channel or DM channel you have access to.A list of embed objects. Each dict maps to the Discord embed structure. Maximum of 10 embeds per message.
A list of message component objects (action rows, buttons, select menus). Pass an empty list
[] to explicitly send no components.dict representing the created Message object.
edit_message
Edit the content or embeds of an existing message. You can only edit messages sent by your own account.The new message content. Pass an empty string
"" to remove the text body (provided an embed or attachment remains).dict.
delete_message / bulk_delete
Delete a single message or a batch of up to 100 messages at once.(bulk_delete only) A list of message IDs to delete. Must contain between 2 and 100 entries.
None on success.
fetch_message / fetch_messages
Retrieve a single message by ID, or fetch a paginated list of messages from a channel.Return messages surrounding this message ID. Discord returns up to
limit messages centred on the given ID. Cannot be combined with before or after.fetch_message→ a single Messagedictfetch_messages→ alist[dict]of Message objects, ordered newest-first
Only one of
before, after, or around may be specified in a single fetch_messages call.Pins
Pin or unpin a message, and retrieve all currently pinned messages in a channel.pin_message/unpin_message→Nonefetch_pins→list[dict]of pinned Message objects
Discord limits channels to 50 pinned messages. Attempting to pin a 51st message raises a
400 Bad Request with the Maximum number of pins reached error.Reactions
Add, remove, and inspect emoji reactions on messages. Both Unicode emoji and custom server emoji are supported.For Unicode emoji, pass the literal character (e.g.
"👍"). For custom emoji, pass "name:id" (e.g. "pepe:123456789").add_reaction/remove_reaction/clear_reactions→Nonefetch_reactions→list[dict]of partial User objects who reacted with that emoji
trigger_typing
Send a typing indicator to a channel. The indicator appears for approximately 10 seconds or until a message is sent, whichever comes first.None
crosspost_message
Publish (crosspost) a message from an Announcement channel so it propagates to all channels that follow it.dict.
Crossposting only works in channels of type
5 (Guild Announcement). Calling this on a regular text channel raises a 400 Bad Request.search_messages
Search for messages within a guild using Discord’s built-in message search. Results respect the same access controls as manual searches in the client.dict with a messages key containing a list[list[dict]], where each inner list is a context cluster of Message objects around a matching result.
Discord’s search index is not real-time. Very recently sent messages may not appear in results immediately.