def update_motd(cfg: Config, motd: str) -> str:
    events = get_events(cfg)
    old_motd = events['motd']
    events['motd'] = motd
    save_events(cfg, events)
    return old_motd
def update_motd(cfg: Config, motd: str) -> str:
    events = get_events(cfg)
    old_motd = events['motd']
    events['motd'] = motd
    save_events(cfg, events)
    return old_motd