|
|
@@ -357,8 +357,11 @@ namespace Discord |
|
|
|
return msg; |
|
|
|
} |
|
|
|
|
|
|
|
public Task<Message> SendFile(string filePath) |
|
|
|
=> SendFile(Path.GetFileName(filePath), File.OpenRead(filePath)); |
|
|
|
public async Task<Message> SendFile(string filePath) |
|
|
|
{ |
|
|
|
using (var stream = File.OpenRead(filePath)) |
|
|
|
return await SendFile(Path.GetFileName(filePath), stream); |
|
|
|
} |
|
|
|
public async Task<Message> SendFile(string filename, Stream stream) |
|
|
|
{ |
|
|
|
if (filename == null) throw new ArgumentNullException(nameof(filename)); |
|
|
|