SDK reference
The public client methods, interaction objects and REST entry points in one place.
Examples use the bot client from Your first bot.
Client methods
Client methods that perform HTTP work are asynchronous. Python run connects and waits until the socket closes; JavaScript connect starts the connection and ready signals server acceptance. JavaScript includes type declarations, and Python ships py.typed.
| JavaScript / Python | Purpose |
|---|---|
| me() / me() | Application identity, bot user and installations |
| registerCommands(commands) / register_commands(commands) | Replace command definitions |
| channels(serverId) / channels(server_id) | List visible installed-server channels |
| members(serverId, cursor?) / members(server_id, cursor=None) | List up to 100 basic member identities and the next cursor |
| member(serverId, userId) / member(server_id, user_id) | Read one member, joined date and current roles |
| roles(serverId) / roles(server_id) | List role metadata in hierarchy order |
| send(channelId, content?, options?) / send(channel_id, content="", **options) | Send text, embeds, uploaded files or controls with a delivery ID |
| edit(channelId, messageId, payload) / edit(channel_id, message_id, **options) | Update only supplied rich fields; legacy text/control arguments still work |
| delete(channelId, messageId) / delete(channel_id, message_id) | Delete an eligible message |
| history(channelId, options?) / history(channel_id, before=None, limit=None) | Paginated channel messages and nextCursor; requires Message Content |
| upload(blob, filename?) / upload(data, filename, content_type) | Upload a file, then use its returned URL |
| openDM(userId) / open_dm(user_id) | Open an eligible DM |
| sendDM(conversationId, content?, options?) / send_dm(conversation_id, content="", **options) | Send a keyed text or rich DM |
| editDM(conversationId, messageId, payload) / edit_dm(conversation_id, message_id, **options) | Edit your own DM message |
| deleteDM(conversationId, messageId) / delete_dm(conversation_id, message_id) | Delete your own DM message |
| moderate(serverId, userId, action, options?) / moderate(server_id, user_id, action, **options) | Kick, ban, unban, timeout or clear-timeout |
| unban(serverId, userId) / unban(server_id, user_id) | Lift a ban with Ban Members consent |
| clearTimeout(serverId, userId) / clear_timeout(server_id, user_id) | Remove a lower member’s timeout |
| setRole(serverId, userId, roleId, add?) / set_role(server_id, user_id, role_id, add=True) | Add or remove an eligible role |
| joinVoice(channelId) / join_voice(channel_id) | Join server voice; returns VoiceConnection |
| connect() / connect() | Start the live gateway |
| close() / close() | Stop gateway and owned voice resources; await in Python |
Interaction fields
reply, defer and showModal / show_modal respond to an interaction. VoiceConnection exposes play, stop and leave; JavaScript state uses channelId / serverId, while Python uses channel_id / server_id. Both expose playing and closed.
| Field | Meaning |
|---|---|
| id, kind, data | Interaction ID, command/component/form kind and event data |
| userId / user_id | The invoking user |
| serverId / server_id | Server ID, or null for a DM |
| channelId / channel_id | Channel ID, or null for a DM |
| voiceChannelId / voice_channel_id | Caller’s connected, visible voice channel in this server; otherwise null / None |
| conversationId / conversation_id | DM conversation ID, or null in a server |
| data.name, data.customId, data.values | Command name, control/form ID and supplied values; JSON keys stay camelCase in Python |
Reply and followup methods
Message responses have a stable id and updatedAt. Public responses include message; private responses include content, embeds, components and uploaded-file fields directly. A deletion returns deleted:true with the same ID and a newer timestamp. Reply edits, deletion and followups expire with the interaction and cannot widen a private audience.
| JavaScript / Python | Purpose |
|---|---|
| reply(content?, options?) / reply(content="", **options) | Send a public or private text/rich response |
| defer(options?) / defer(private=None) | Acknowledge slow work and choose the audience |
| editReply(payload) / edit_reply(**options) | Edit the first message response or complete its deferral |
| deleteReply() / delete_reply() | Delete the first message response |
| followUp(content?, options?) / follow_up(content="", **options) | Send another message with the same audience |
| editFollowUp(responseId, payload) / edit_followup(response_id, **options) | Edit a particular followup |
| deleteFollowUp(responseId) / delete_followup(response_id) | Delete a particular followup |
| showModal(modal) / show_modal(modal) | Open a form as the initial acknowledgement |
Direct REST access
The base is https://riscord.ir/api/bot/v1. Authenticate with Authorization: Bot followed by your bot token. Bot tokens cannot authenticate to human or staff APIs. The downloadable API contract lists every route, payload, limit and gateway envelope.
The SDK request helper accepts a path relative to this base, a method and an optional body. Prefer the named methods when one exists. Public event and resource IDs are strings in both languages.