public Message SendMessage(MessageProperties properties) { return(Client.SendMessage(Id, properties)); }
public DiscordMessage SendMessage(MessageProperties properties) { return(SendMessageAsync(properties).GetAwaiter().GetResult()); }
public Task <DiscordMessage> SendMessageAsync(MessageProperties properties) { return(Client.SendMessageAsync(Id, properties)); }
public static DiscordMessage SendMessage(this DiscordClient client, ulong channelId, MessageProperties properties) { return(client.SendMessageAsync(channelId, properties).GetAwaiter().GetResult()); }
public static async Task <DiscordMessage> SendMessageAsync(this DiscordClient client, ulong channelId, MessageProperties properties) { if (properties.ReplyTo != null) { properties.ReplyTo.ChannelId = channelId; } return((await client.HttpClient.PostAsync($"/channels/{channelId}/messages", properties)) .Deserialize <DiscordMessage>().SetClient(client)); }
public static Message SendMessage(this DiscordClient client, long channelId, MessageProperties properties) { return(client.HttpClient.Post($"/channels/{channelId}/messages", JsonConvert.SerializeObject(properties)).Deserialize <Message>().SetClient(client)); }