From bad9ac3d28bb0417dedcdddf10cf764c08d1d6ae Mon Sep 17 00:00:00 2001 From: Zeyla Hellyer Date: Sat, 25 Feb 2017 09:25:02 -0800 Subject: Add missing send_file/send_message impls Add the `send_file` method to: - `model::Channel` - `model::Group` - `model::GuildChannel` Add the `send_message` method to: - `model::Channel` Additionally, add more documentation for these with an example. --- src/utils/builder/create_message.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/utils/builder') diff --git a/src/utils/builder/create_message.rs b/src/utils/builder/create_message.rs index 90a1f65..b139d26 100644 --- a/src/utils/builder/create_message.rs +++ b/src/utils/builder/create_message.rs @@ -20,10 +20,17 @@ use super::CreateEmbed; /// /// Sending a message with a content of `"test"` and applying text-to-speech: /// -/// ```rust,ignore -/// // assuming a `channel_id` has been bound +/// ```rust,no_run +/// use serenity::model::ChannelId; /// -/// channel_id.say(|m| m.content("test").tts(true)); +/// let channel_id = ChannelId(7); +/// +/// let _ = channel_id.send_message(|m| m +/// .content("test") +/// .tts(true) +/// .embed(|e| e +/// .title("This is an embed") +/// .description("With a description"))); /// ``` /// /// [`Context::say`]: ../../client/struct.Context.html#method.say -- cgit v1.2.3