mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
updated ReadMe
This commit is contained in:
parent
6e4b90710a
commit
9cc164b9ec
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
# How to use
|
||||
|
||||
>⚠️ This library relies on asynchronous C# programming (`async/await`) so make sure you are familiar with this before proceeding.
|
||||
>⚠️ This library relies on asynchronous C# programming (`async/await`) so make sure you are familiar with this advanced topic before proceeding.
|
||||
>If you are a beginner in C#, making a project based on this library might not be a great idea.
|
||||
|
||||
After installing WTelegramClient through Nuget, your first Console program will be as simple as:
|
||||
```csharp
|
||||
|
|
|
|||
|
|
@ -1168,7 +1168,7 @@ namespace WTelegram
|
|||
public Task<Message> SendMediaAsync(InputPeer peer, string caption, InputFileBase mediaFile, string mimeType = null, int reply_to_msg_id = 0, MessageEntity[] entities = null, DateTime schedule_date = default)
|
||||
{
|
||||
var filename = mediaFile is InputFile iFile ? iFile.name : (mediaFile as InputFileBig)?.name;
|
||||
mimeType ??= Path.GetExtension(filename).ToLowerInvariant() switch
|
||||
mimeType ??= Path.GetExtension(filename)?.ToLowerInvariant() switch
|
||||
{
|
||||
".jpg" or ".jpeg" or ".png" or ".bmp" => "photo",
|
||||
".gif" => "image/gif",
|
||||
|
|
|
|||
Loading…
Reference in a new issue