File tree Expand file tree Collapse file tree
pyrogram/types/bots_and_keyboards Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616# You should have received a copy of the GNU Lesser General Public License
1717# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818
19- from typing import Union , Optional
19+ from typing import Optional , Union
2020
2121import pyrogram
22- from pyrogram import raw
23- from pyrogram import types
24- from pyrogram import enums
22+ from pyrogram import enums , raw , types
23+
2524from ..object import Object
2625
2726
@@ -139,7 +138,8 @@ def read(b: "raw.base.KeyboardButton"):
139138 button_style = enums .ButtonStyle .DANGER
140139 elif raw_style .bg_success :
141140 button_style = enums .ButtonStyle .SUCCESS
142- elif raw_style .icon :
141+
142+ if raw_style .icon :
143143 icon_custom_emoji_id = str (raw_style .icon )
144144
145145 if isinstance (b , raw .types .KeyboardButtonCallback ):
You can’t perform that action at this time.
0 commit comments