async def set_reply_markup(msg: Dict, request: '<STR_LIT>', stack: '<STR_LIT>')-> None:
from bernard.platforms.telegram.layers import InlineKeyboard,ReplyKeyboard,ReplyKeyboardRemove<EOL>try:<EOL><INDENT>keyboard = stack.get_layer(InlineKeyboard)<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>msg['<STR_LIT>'] = await keyboard.serialize(request)<EOL><DEDENT>try:<EOL><INDENT>keyboard = stack.get_layer(ReplyKeyboard)<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>msg['<STR_LIT>'] = await keyboard.serialize(request)<EOL><DEDENT>try:<EOL><INDENT>remove = stack.get_layer(ReplyKeyboardRemove)<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>msg['<STR_LIT>'] = remove.serialize()<EOL><DEDENT>
Add the "reply markup" to a message from the layers

:param msg: Message dictionary
:param request: Current request being replied
:param stack: Stack to analyze