예제 #1
0
 /// <summary>
 /// Changes a profile photo for the current user
 /// </summary>
 public static Task <Ok> SetProfilePhotoAsync(
     this Client client, InputChatPhoto photo = default)
 {
     return(client.ExecuteAsync(new SetProfilePhoto
     {
         Photo = photo
     }));
 }
예제 #2
0
 /// <summary>
 /// Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right
 /// </summary>
 public static Task <Ok> SetChatPhotoAsync(
     this Client client, long chatId = default, InputChatPhoto photo = default)
 {
     return(client.ExecuteAsync(new SetChatPhoto
     {
         ChatId = chatId, Photo = photo
     }));
 }
예제 #3
0
        public async Task <Updates> editPhoto(InputChannel channel, InputChatPhoto photo)
        {
            var request = new TL.ChannelsEditPhotoRequest(channel, photo);

            await _sender.Send(request);

            await _sender.Receive(request);

            return(request.Result);
        }