def get_user_sids(bot, uid):
    """Returns a set of servers that the user and the bot share"""
    shared_servers = {bot_server for bot_server in bot.guilds
                      if bot_server.get_member(uid)}
    shared_sids = {shared_server.id for shared_server in shared_servers}
    return shared_sids