From 437976b7d9b8637fbf5173c1274980fb11f349d1 Mon Sep 17 00:00:00 2001 From: archfan <33993466+archfan7411@users.noreply.github.com> Date: Tue, 27 Aug 2019 11:37:41 -0400 Subject: [PATCH] Add documentation for discord.send param #2 --- API.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 94f4c2f..c0cafe1 100644 --- a/API.md +++ b/API.md @@ -4,9 +4,10 @@ It does not expose the command interface or logins to the API, and `discord.register_on_message` events will *not* recieve login information. -### `discord.send(message)` +### `discord.send(message [, optional id])` Sends `message` to Discord. This function makes an HTTP request; therefore the sending of large volumes of data might be better grouped into a single request. **Do note that Discord limits messages to 2,000 characters, and the relay automatically cuts off messages.** +The optional `id` parameter specifies a specific Discord user to send the message to. ### `discord.register_on_message(function(name, message))` -Adds a function to `discord.registered_on_messages`, which are called every time a message is received from Discord, excluding logins. `name` is by default the Discord username of the user who sent the message (excluding the discriminator) and `message` is the message content. This function should be called on startup. \ No newline at end of file +Adds a function to `discord.registered_on_messages`, which are called every time a message is received from Discord, excluding logins. `name` is by default the Discord username of the user who sent the message (excluding the discriminator) and `message` is the message content. This function should be called on startup.