コード例 #1
0
 public Message SendMessage(MessageProperties properties)
 {
     return(Client.SendMessage(Id, properties));
 }
コード例 #2
0
 public DiscordMessage SendMessage(MessageProperties properties)
 {
     return(SendMessageAsync(properties).GetAwaiter().GetResult());
 }
コード例 #3
0
 public Task <DiscordMessage> SendMessageAsync(MessageProperties properties)
 {
     return(Client.SendMessageAsync(Id, properties));
 }
コード例 #4
0
 public static DiscordMessage SendMessage(this DiscordClient client, ulong channelId, MessageProperties properties)
 {
     return(client.SendMessageAsync(channelId, properties).GetAwaiter().GetResult());
 }
コード例 #5
0
        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));
        }
コード例 #6
0
ファイル: Extensions.cs プロジェクト: ufgf/Anarchy
 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));
 }