Awonjyi, who was making his 23 appearance, has netted four goals and bagged one assist this season.
The Nigerian international had the chance to put his name on the score sheet but his shot failed to threatened the Brentford goalkeeper.
He was substituted in the 54th minute for Andre Ayew.
His Nigerian compatriot, Onyaka came on as a substitute in the 71st minute for Vitaly Janelt.
However, Nottingham took the lead in the 45th minute through Danilo to the delight of the technical crew.
But then, Ivan Toney leveled parity for Brentford in the 82nd minute.
With the game looking like a draw, Josh Dasilva however, stepped forward to score the match winner for the host.